How to: Execute (another's class) private methods(ebersys.blogspot.com)

submitted by BlackTigerXBlackTigerX(460) 5 years, 3 months ago

Do you need to get access to a method that has been marked as private? here's how you can

4 comments |category: |Views: 23

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by trumpitrumpi(370) 5 years, 3 months ago 0

This is totally not a good idea.

Not a good idea...

Reply

posted by gavinjoycegavinjoyce(25.7k) 5 years, 3 months ago 0

Invoking private methods can be a good idea when you need consume a class in a way in which the author had not imagined or catered for. I have used reflection to automate .NET products which were not designed for automation (code conversion).

Reply

posted by marcosmarcos(2779) 5 years, 3 months ago 0

Is also very useful to loop through the internal controls, for example I use some code to hide the Status bar of the crystal report viewer and to change some values in winforms controls =) of course that nothing of this cant be posible without REFLECTOR.

Best Regards

Reply

posted by BlackTigerXBlackTigerX(460) 5 years, 3 months ago 0

not a good idea I agree, but people need to be aware that it is possible and at some time you get to the point where you need it

Reply

information Login or create an account to comment on this story