8.2. Runtime Type Reflection

The System.Reflection namespace defines a set of special Info classes, such as the MethodInfo class we saw in the previous section, that provide access to the attributes and metadata of constructors, events, fields, methods, parameters, properties, and so on. These classes are listed in Table 8.1.

Table 8.1. Info Classes within the System.Reflection Namespace
class Description
MemberInfo Discovers the attributes of a member and provides access to member metadata. Abstract base class.
MethodInfo Discovers the attributes of a method and provides access to method metadata.
ParameterInfo Discovers the attributes of a parameter and provides access to parameter metadata.
ConstructorInfo Discovers the attributes of a class ...

Get C# Primer: A Practical Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.