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

Explain the .net framework.

634


What are HTML Helpers, AJAX Helpers in ASP.Net MVC?

660


Can I set the unlimited length for "maxjsonlength" property in config?

653


what is complex type?

675


What is basic authentication in web api?

613






In razor syntax, what is the escape sequence character for @ symbol?

638


Can I uninstall microsoft .net framework?

637


What are sections?

670


Explain what languages does the .net framework support?

617


Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?

728


explain lazy loading, eager loading, and explicit loading?

660


What are ajax helpers in asp.net mvc?

682


Where are the routing rules defined in an asp.net mvc application?

631


What is the purpose of a web form?

641


What is web api‘s in asp.net mvc 4 ?

690