Reflections C# – A run time thing

Reflection is a basically the mechanism by which code can get on itself, such as meta data as well as on other code as well. Reflection is more of type C++ RTTI (Runtime Type Interpretation). Reflection allows us to find if a given method in class exists, if it exists then use it if not, then invoke another method.

The real use of Reflection is in test framework where the framework goes though all the methods and see if the method is marked as a test method using attribute.

Reflection is also used to create classes on the fly on run time and call methods on that class or object. However this can be done with out reflection in modern languages.

A good tuturial about getting started with reflection is this

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s