Reflection in asp.net

Started by vikramrandhawa, September 28, 2011, 04:34:27 AM

vikramrandhawa

What are the uses of Reflection?..

goneraone12

Hi...Reflection provides objects (of type Type) that encapsulate assemblies, modules and types. Reflection is the ability to read metadata at runtime. Using reflection, it is possible to uncover the methods, properties, and events of a type, and to invoke them dynamically. Reflection also allows us to create new types at runtime. Reflection generally begins with a call to a method present on every object in the .NET framework: GetType. The GetType method is a member of the System. Object class, and the method returns an instance of System.Type. System.Type is the primary gateway to metadata. System.Type is actually derived from another important class for reflection: the MemeberInfo class from the System.Reflection namespace. MemberInfo is a base class for many other classes who describe the properties and methods of an object, including FieldInfo, MethodInfo, ConstructorInfo, ParameterInfo, and EventInfo among others. As you might suspect from their names, you can use these classes to inspect different aspects of an object at runtime.

mobitech

Reflection API allows you to fetch type (assembly) information at runtime programmatically. We can also achieve late binding by using .NET Reflection. At runtime, the Reflection mechanism uses the PE file to read information about the assembly. Reflection enables you to use code that is not available at compile time. .NET Reflection allows an application to collect information about itself and also to manipulate on itself. It can be used effectively to find all types in an assembly and/or dynamically invoke methods in an assembly. This includes information about the type, properties, methods, and events of an object. With Reflection, we can dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties.............

harrys01

According to me,Reflection is an application which collect information about itself and manipulate on itself. It is a process of searching about the objects during runtime.

anshuera

The classes of the System.Reflection.Emit namespace provide a specialized form of reflection that enables you to build types at run time.
Reflection can also be used to create applications called type browsers, which enable users to select types and then view the information about those types.