Jump to content
  • Advertisement
Sign in to follow this  
Krisc

[.net] Reflection Tutorial

This topic is 4702 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a reflection tutorial and wish for some feedback... anyone have advice? Reflection! :P It is about changing some properties and calling some methods in a form!

Share this post


Link to post
Share on other sites
Advertisement
Reflection is a big topic and as you are focusing on a fairly small application of reflection, I would recomend changing your title to reflect that.

Something like "Accessing private methods and data with reflection" or "Using reflection to circumvent compile time code security".

Otherwise, it is solid and simple. Thanks for sharing your knowledge. [smile]

Share this post


Link to post
Share on other sites
A couple of comments:

Reflection is a method of getting aroung <- should be "around"

"The purpose of reflection is to get access to private or protected methods"
I don't think this is entirely true - the purpose of it is to access methods, fields etc through code - you can access public methods also, and I believe security demands can be set to make reflection obey the access specifications of members and types. It can be used to circunvent access - but only if security for that binary hasn't been set up to stop it.

Reflection allows you to query objects for what methods they own, what attributes they have and use them , basically allowing for typeless programing. If you really want or need it :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!