Building a Custom Metadata Viewer
To illustrate the basic process of reflection (and the usefulness of System.Type), let’s create a Con-
sole Application named MyTypeViewer. This program will display details of the methods, properties,
fields, and supported interfaces (in addition to some other points of interest) for any type within
mscorlib.dll (recall all .NET applications have automatic access to this core framework class
library) or a type within MyTypeViewer itself. Once the application has been created, be sure to
import the System.Reflection namespace.
using System.Reflection;
Do'stlaringiz bilan baham: |