private methods using .net reflection. why??
-
Hi I used reflection many times before on public methods but never realized that private methods can be invoked too. See the link : link I am still thinking why is that allowed in the first place? Isn't that going to break the rule of "private" being "private"? puzzled AJ
Follow your goals, Means will follow you ---Gandhi---
-
Hi I used reflection many times before on public methods but never realized that private methods can be invoked too. See the link : link I am still thinking why is that allowed in the first place? Isn't that going to break the rule of "private" being "private"? puzzled AJ
Follow your goals, Means will follow you ---Gandhi---
It's reflection, the very concept of it breaks all rules - much like arbitrary pointer arithmetic and type punning That doesn't matter though, these things are useful in practice, The Rules are mostly of theoretical value (for example to be able to prove things about programs) and are only guidelines in the Real World.