In Java you can invoke a private method like so:
Method m = obj.getClass().getDeclaredMethod("foo", null); m.setAccessible(true); m.invoke("bar");
What is the equivalence in C#? I need to call a private method in the Unit Test.
Aucun commentaire:
Enregistrer un commentaire