July 2002
Beginner
720 pages
14h 35m
English
The Type class is our entry point into the Reflection namespace and its members. Reflection, in .NET terms, is the ability to examine the capabilities of classes at runtime. By using Reflection, we can take a class and examine its methods, properties, constructors, fields, events, and other members – that is, the metadata associated with a class.
The Type class contains methods such as GetMethods and GetProperties that are used to return member information. By using the classes inside the Reflection namespace, we can go deeper and examine, for example, parameters of the methods (using System.Reflection.MethodInfo class) and even call methods via the Invoke method.
The following example can be used as ...
Read now
Unlock full access