Say you have a method with the signature:
public class Class
{
private void ThisShouldOnlyBeUsedByMe()
{
. . .
}
}
you can call this method via reflection by just doing typeof(Class).GetMethod("ThisShouldOnlyBeUsedByMe", flags).Invoke(instance, null);
but, is there any way to prevent this?
Aucun commentaire:
Enregistrer un commentaire