Skip to main content
gamedev.net
🔒 Locked

[.net] Reflection Tutorial

Started by Krisc Jan 26, 2006 at 10:58 AM 1 replies 600+ views
Original Post
Krisc
Krisc
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!
turnpast
turnpast
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]
alexmoura
alexmoura
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 :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.