Today I am going to continue my series of Reflection And Attributes Tutorial. Lets begin with System.Type Members.
Once a Type object is created, the fun begins. You can use Type properties and methods to inspect the type’s constructors, methods, attributes, fields, interfaces, and events. Examples
of their use are provided throughout this chapter.
For each method that returns an array of types or members, there is a corresponding method (same name without the final “s”) that searches for a single member or value. For example, to return a Type reference to the IDictionary interface, you could use:
// Return null if interface no inherited
Type inType = hType.GetInterface("IDictionary");
Most of the Type methods include an overload with a BindingFlags parameter. BindingFlags is an enumeration that includes values that can be used to filter the reflection search for members and types. Some of its more useful members include NonPublic, Public, Static, and DeclaredOnly (not inherited).
that's it for today.