System.Reflection Namespace

Provides types that allow late-bound access and inspection of the application's metadata at runtime. This includes information about modules, types, members, and parameters. It's fundamental for building reflection-based libraries, serialization frameworks, and dynamic code generation.

Classes

Assembly

public sealed class Assembly : System.Reflection.MemberInfo

Represents an assembly, which is a partially trusted, executable module that can be run, or a dll that is loaded and examined. Assemblies are the building blocks of .NET applications, providing versioning, security, and deployment capabilities.

MethodInfo

public abstract class MethodInfo : System.Reflection.MethodBase

Represents a method or constructor on a type. It provides information about the method's name, parameters, return type, and attributes.

PropertyInfo

public abstract class PropertyInfo : System.Reflection.MemberInfo

Represents a property on a type. It provides information about the property's name, type, and whether it is readable or writable.

FieldInfo

public abstract class FieldInfo : System.Reflection.MemberInfo

Represents a field on a type. It provides information about the field's name, type, and visibility.

Type

public abstract class Type : System.Reflection.MemberInfo, System.Reflection.IReflect

Represents type declarations. This includes class types, interface types, array types, value types, enum types, type parameters, generic type definitions, and open or closed generic types. It's the central class for inspecting metadata.

Interfaces

IReflect

public interface IReflect : System.Reflection.IReflectMembers

Defines members that allow reflection to be performed on an object.

IReflectMembers

public interface IReflectMembers

Defines members that allow reflection to be performed on the members of an object.

Enums

BindingFlags

public enum BindingFlags

Specifies flags that control MemberInfo caching and member retrieval operations.

Members:
  • Public: Specifies public members.
  • NonPublic: Specifies non-public members.
  • Static: Specifies static members.
  • Instance: Specifies instance members.
  • DeclaredOnly: Specifies that only members declared by the type itself are returned.

MemberTypes

public enum MemberTypes

Indicates the type of member.

Members:
  • Constructor
  • Event
  • Field
  • Method
  • Property
  • Type
  • Custom
  • NestedType
  • All