Introduction
In the .NET Framework,
every program is compiled into an assembly containing metadata which has
information of assembly behavior and structure. Reflection in .NET is used
to observe and change the behavior of any object which means you can read read
metadata of an object through reflection.
Current sample is going
to describe following features of Reflection,
- Object properties and their datatypes.
- Call object methods dynamically.
The first thing to use
reflection in your project is, include the reflection namespace,
using System.Reflection;