What are the uses of Reflection?

1. Viewing Metadata.
2.Performing type discovery.
3.Late binding to methods and properties (dynamic invocation)
4.Creating new types at runtime(Reflection EMIT)

Questions by RadMac

Showing Answers 1 - 12 of 12 Answers

kapil_deo

  • Dec 12th, 2007
 

Reflection is used for the late binding of an object in .Net.  By using Reflection one can use the COM components and create the Objects of them at Runtime. It invokes the Methods , Properties etc of that COM Object.

  Was this answer useful?  Yes

how about default serialization of objects ?

how about the databinding of classes to display objects ?

by being able to get the description of an object one can do many things ...

  Was this answer useful?  Yes

kirangiet

  • Sep 10th, 2009
 

Reflection is a concept using which we can

1) Load assemblies dynamically
2) Invoke methods at runtime
3) Retriving type information at runtime.

We are using reflection in Unit Testing for testing Private methods.
Infact our friend Mr. Intellisence of MS.NET, internally using reflection only. That is the reason we are getting only type specific methods and properties in Intellisence.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions