What is Reflection

Questions by sanjayg

Showing Answers 1 - 11 of 11 Answers

Anand

  • Nov 20th, 2005
 

Reflection class is used get information,access an manuplate assemblies along with the metadat with it.

Sameeksha

  • Dec 1st, 2005
 

Reflection is a collection of classes which allow you to query assembly (classes/objects) metadata at runtime. Using reflection you can also create new types and their instances at runtime and invoke methods on these new type instances.

There are other uses for reflection. Compilers for languages such as JScript use reflection to construct symbol tables.

In .Net the classes in the System.Runtime.Serialization namespace use reflection to access data and to determine which fields to persist. You can use System.Reflection.Emit namespace to dynamically generate types.

  Was this answer useful?  Yes

suneetha

  • Dec 31st, 2005
 

All .net compliers produce metadata, which is packaged along with the module and can be accessed by a mechanism called reflection

  Was this answer useful?  Yes

sabir

  • Jan 13th, 2006
 

system.refelection is namespace used to get name information about the assembly

Brian

  • Feb 2nd, 2006
 

Wow most of these answers are not too good except maybe for the first... To describe reflection as a set of classes doesn't explain reflection what so ever.Reflection is a method to identify/manipulate compile-time and runtime code. Reflection is the .Net version of the functionality provided by RTTI (RunTimeTypeIdentification) in old MFC.

  Was this answer useful?  Yes

vvijaychandra

  • Jun 24th, 2006
 

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 thier names, you can use these classes to inspect different aspects of an object at runtime.

kartik bhatt

  • May 11th, 2012
 

reflection is the bending of light

  Was this answer useful?  Yes

nalini

  • Jul 7th, 2015
 

Reflection is a feature to obtain the types contained in assemblies.

  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