What is reflection?

Answer Posted / swapna

All .NET compilers produce metadata about the types defined
in the modules they produce. This metadata is packaged
along with the module (modules in turn are packaged
together in assemblies), and can be accessed by a mechanism
called reflection.

The System.Reflection namespace contains classes that can
be used to interrogate the types for a module/assembly.

Using reflection to access .NET metadata is very similar to
using ITypeLib/ITypeInfo to access type library data in
COM, and it is used for similar purposes - e.g. determining
data type sizes for marshaling data across
context/process/machine boundaries.

Reflection can also be used to dynamically invoke methods (
System.Type.InvokeMember ) , or even create types
dynamically at run-timeystem.Reflection.Emit.TypeBuilder).

Is This Answer Correct ?    9 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the gac in the .net framework.

665


Is .net framework going away?

660


What is oauth in web api?

609


How to use Jquery Plugins in ASP.Net MVC validation?

633


what is entity framework?

686






How we can add the css in mvc?

685


What are the components required to create a route in mvc?

709


What is the purpose of a web form?

641


What are Code Blocks in Views?

748


What are actions in mvc?

651


What is the use of display modes?

660


what is minimum requirement for entity framework applications to run?

675


Explain the 'page lifecycle' of an ASP.NET MVC?

720


What is the difference between model and entity?

586


Explain covariance and contra-variance in .net framework 4.0. Give an example for each.

672