What is reflection?

Answer Posted / kirti

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 (see System.Type.InvokeMember ) , or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 2 popular asp.net mvc view engines?

523


Why to use Html.Partial in ASP.Net MVC?

603


What is the advantage of mvc?

616


What is objectset? : Entity framework

548


What is .net framework in simple terms?

538






Possible ways to prevent xss attacks on mvc application?

573


What is poco proxy? : Entity framework

556


What is basic authentication in web api?

527


What is difference between razor and web form engine?

536


Explain Keep method in Tempdata in ASP.Net MVC?

568


explain why t4 entity is important in entity framework?

563


How do you specify comments using razor syntax?

602


Explain the methods used to render the views in ASP.Net MVC?

631


Which are the important namespaces used in mvc?

714


What is domain class model?

517