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.MemberInfoRepresents 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.MethodBaseRepresents 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.MemberInfoRepresents 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.MemberInfoRepresents 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.IReflectRepresents 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.IReflectMembersDefines members that allow reflection to be performed on an object.
IReflectMembers
public interface IReflectMembersDefines members that allow reflection to be performed on the members of an object.
Enums
BindingFlags
public enum BindingFlagsSpecifies flags that control MemberInfo caching and member retrieval operations.
- 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 MemberTypesIndicates the type of member.
- Constructor
- Event
- Field
- Method
- Property
- Type
- Custom
- NestedType
- All