We can access some data about object at runtime by using Reflection.
That information contain
· Data of the class
· Names of the Methods that are inside the class
· Constructor of that Object.
To write a C# .Net program this uses reflection,
The program should use the namespace System.Reflection.
To get type of the object,
The typeof operator can be used.
There is one more method GetType ().
– uses to get data about object’s type
By using Reflection we can do the following
· Can get all methods from a class
· Can get all Fields and Properties from a class
· Can get information about assembly
· Can create instance for a class
· Can execute a class method indirectly
· Can get type information: base type, is abstract, is com object, is sealed, is class
· Can get all implemented interfaces and inherited base classes