.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

All about Reflection

Posted By:Karthikeyan Anbarasan       Posted Date: May 30, 2011    Points: 40    Category: Visual Studio    URL: http://www.dotnetspark.com  

This small article will guide All about Reflection in .NET Framework

Reflection is


·         It is a collection of classes which allow u to query assembly (class/object) metadata at runtime.

·         Using reflection we can also create new types and their instances at runtime and invoke methods on these new instances.

·         At runtime, the Reflection mechanism uses the PE file to read information about the assembly.

·         We can dynamically invoke methods using System.Type.Invokemember

·          We can dynamically create types at runtime using System.Reflection.Emit.TypeBuilder

·         With reflection we can do the below

Ø  we can dynamically create an instance of a type

Ø  bind the type to an existing object

Ø  get the type from an existing object

Ø  invoke its methods or access its fields and properties


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend