mscorlib(4.0.0.0) API with additions
System.Reflection Namespace Reference

Classes

class  AmbiguousMatchException
 The exception that is thrown when binding to a member results in more than one member matching the binding criteria. This class cannot be inherited. More...
 
class  Assembly
 Represents an assembly, which is a reusable, versionable, and self-describing building block of a common language runtime application. More...
 
class  AssemblyAlgorithmIdAttribute
 Specifies an algorithm to hash all files in an assembly. This class cannot be inherited. More...
 
class  AssemblyCompanyAttribute
 Defines a company name custom attribute for an assembly manifest. More...
 
class  AssemblyConfigurationAttribute
 Specifies the build configuration, such as retail or debug, for an assembly. More...
 
class  AssemblyCopyrightAttribute
 Defines a copyright custom attribute for an assembly manifest. More...
 
class  AssemblyCultureAttribute
 Specifies which culture the assembly supports. More...
 
class  AssemblyDefaultAliasAttribute
 Defines a friendly default alias for an assembly manifest. More...
 
class  AssemblyDelaySignAttribute
 Specifies that the assembly is not fully signed when created. More...
 
class  AssemblyDescriptionAttribute
 Provides a text description for an assembly. More...
 
class  AssemblyFileVersionAttribute
 Instructs a compiler to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number. More...
 
class  AssemblyFlagsAttribute
 Specifies a bitwise combination of T:System.Reflection.AssemblyNameFlags flags for an assembly, describing just-in-time (JIT) compiler options, whether the assembly is retargetable, and whether it has a full or tokenized public key. This class cannot be inherited. More...
 
class  AssemblyInformationalVersionAttribute
 Defines additional version information for an assembly manifest. More...
 
class  AssemblyKeyFileAttribute
 Specifies the name of a file containing the key pair used to generate a strong name. More...
 
class  AssemblyKeyNameAttribute
 Specifies the name of a key container within the CSP containing the key pair used to generate a strong name. More...
 
class  AssemblyMetadataAttribute
 Defines a key/value metadata pair for the decorated assembly. More...
 
class  AssemblyName
 Describes an assembly's unique identity in full. More...
 
class  AssemblyNameProxy
 Provides a remotable version of the AssemblyName. More...
 
class  AssemblyProductAttribute
 Defines a product name custom attribute for an assembly manifest. More...
 
class  AssemblySignatureKeyAttribute
 Provides migration from an older, simpler strong name key to a larger key with a stronger hashing algorithm. More...
 
class  AssemblyTitleAttribute
 Specifies a description for an assembly. More...
 
class  AssemblyTrademarkAttribute
 Defines a trademark custom attribute for an assembly manifest. More...
 
class  AssemblyVersionAttribute
 Specifies the version of the assembly being attributed. More...
 
class  Binder
 Selects a member from a list of candidates, and performs type conversion from actual argument type to formal argument type. More...
 
class  ConstructorInfo
 Discovers the attributes of a class constructor and provides access to constructor metadata. More...
 
class  CustomAttributeData
 Provides access to custom attribute data for assemblies, modules, types, members and parameters that are loaded into the reflection-only context. More...
 
class  CustomAttributeExtensions
 Contains static methods for retrieving custom attributes. More...
 
class  CustomAttributeFormatException
 The exception that is thrown when the binary format of a custom attribute is invalid. More...
 
struct  CustomAttributeNamedArgument
 Represents a named argument of a custom attribute in the reflection-only context. More...
 
struct  CustomAttributeTypedArgument
 Represents an argument of a custom attribute in the reflection-only context, or an element of an array argument. More...
 
class  DefaultMemberAttribute
 Defines the member of a type that is the default member used by M:System.Type.InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]). More...
 
class  EventInfo
 Discovers the attributes of an event and provides access to event metadata. More...
 
class  ExceptionHandlingClause
 Represents a clause in a structured exception-handling block. More...
 
class  FieldInfo
 Discovers the attributes of a field and provides access to field metadata. More...
 
interface  ICustomAttributeProvider
 Provides custom attributes for reflection objects that support them. More...
 
interface  ICustomTypeProvider
 Represents an object that provides a custom type. More...
 
struct  InterfaceMapping
 Retrieves the mapping of an interface into the actual methods on a class that implements that interface. More...
 
class  IntrospectionExtensions
 Contains methods for converting T:System.Type objects. More...
 
class  InvalidFilterCriteriaException
 The exception that is thrown in M:System.Type.FindMembers(System.Reflection.MemberTypes,System.Reflection.BindingFlags,System.Reflection.MemberFilter,System.Object) when the filter criteria is not valid for the type of filter you are using. More...
 
interface  IReflect
 Interoperates with the IDispatch interface. More...
 
interface  IReflectableType
 Represents a type that you can reflect over. More...
 
class  LocalVariableInfo
 Discovers the attributes of a local variable and provides access to local variable metadata. More...
 
class  ManifestResourceInfo
 Provides access to manifest resources, which are XML files that describe application dependencies. More...
 
class  MemberInfo
 Obtains information about the attributes of a member and provides access to member metadata. More...
 
class  MethodBase
 Provides information about methods and constructors. More...
 
class  MethodBody
 Provides access to the metadata and MSIL for the body of a method. More...
 
class  MethodInfo
 Discovers the attributes of a method and provides access to method metadata. More...
 
class  Missing
 Represents a missing T:System.Object. This class cannot be inherited. More...
 
class  Module
 Performs reflection on a module. More...
 
class  ObfuscateAssemblyAttribute
 Instructs obfuscation tools to use their standard obfuscation rules for the appropriate assembly type. More...
 
class  ObfuscationAttribute
 Instructs obfuscation tools to take the specified actions for an assembly, type, or member. More...
 
class  ParameterInfo
 Discovers the attributes of a parameter and provides access to parameter metadata. More...
 
struct  ParameterModifier
 Attaches a modifier to parameters so that binding can work with parameter signatures in which the types have been modified. More...
 
class  Pointer
 Provides a wrapper class for pointers. More...
 
class  PropertyInfo
 Discovers the attributes of a property and provides access to property metadata. More...
 
class  ReflectionContext
 Represents a context that can provide reflection objects. More...
 
class  ReflectionTypeLoadException
 The exception that is thrown by the M:System.Reflection.Module.GetTypes method if any of the classes in a module cannot be loaded. This class cannot be inherited. More...
 
class  RuntimeReflectionExtensions
 Provides methods that retrieve information about types at run time. More...
 
class  StrongNameKeyPair
 Encapsulates access to a public or private key pair used to sign strong name assemblies. More...
 
class  TargetException
 Represents the exception that is thrown when an attempt is made to invoke an invalid target. More...
 
class  TargetInvocationException
 The exception that is thrown by methods invoked through reflection. This class cannot be inherited. More...
 
class  TargetParameterCountException
 The exception that is thrown when the number of parameters for an invocation does not match the number expected. This class cannot be inherited. More...
 
class  TypeDelegator
 Wraps a T:System.Type object and delegates methods to that Type. More...
 
class  TypeInfo
 Represents type declarations for class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types. More...
 

Enumerations

enum  AssemblyContentType { AssemblyContentType.Default, AssemblyContentType.WindowsRuntime }
 Provides information about the type of code contained in an assembly. More...
 
enum  AssemblyNameFlags {
  AssemblyNameFlags.None = 0x0, AssemblyNameFlags.PublicKey = 0x1, AssemblyNameFlags.EnableJITcompileOptimizer = 0x4000, AssemblyNameFlags.EnableJITcompileTracking = 0x8000,
  AssemblyNameFlags.Retargetable = 0x100
}
 Provides information about an T:System.Reflection.Assembly reference. More...
 
enum  BindingFlags {
  BindingFlags.Default = 0x0, BindingFlags.IgnoreCase = 0x1, BindingFlags.DeclaredOnly = 0x2, BindingFlags.Instance = 0x4,
  BindingFlags.Static = 0x8, BindingFlags.Public = 0x10, BindingFlags.NonPublic = 0x20, BindingFlags.FlattenHierarchy = 0x40,
  BindingFlags.InvokeMethod = 0x100, BindingFlags.CreateInstance = 0x200, BindingFlags.GetField = 0x400, BindingFlags.SetField = 0x800,
  BindingFlags.GetProperty = 0x1000, BindingFlags.SetProperty = 0x2000, BindingFlags.PutDispProperty = 0x4000, BindingFlags.PutRefDispProperty = 0x8000,
  BindingFlags.ExactBinding = 0x10000, BindingFlags.SuppressChangeType = 0x20000, BindingFlags.OptionalParamBinding = 0x40000, BindingFlags.IgnoreReturn = 0x1000000
}
 Specifies flags that control binding and the way in which the search for members and types is conducted by reflection. More...
 
enum  CallingConventions {
  CallingConventions.Standard = 0x1, CallingConventions.VarArgs = 0x2, CallingConventions.Any = 0x3, CallingConventions.HasThis = 0x20,
  CallingConventions.ExplicitThis = 0x40
}
 Defines the valid calling conventions for a method. More...
 
enum  CorElementType : byte {
  End = 0, Void = 1, Boolean = 2, Char = 3,
  I1 = 4, U1 = 5, I2 = 6, U2 = 7,
  I4 = 8, U4 = 9, I8 = 10, U8 = 11,
  R4 = 12, R8 = 13, String = 14, Ptr = 0xF,
  ByRef = 0x10, ValueType = 17, Class = 18, Var = 19,
  Array = 20, GenericInst = 21, TypedByRef = 22, I = 24,
  U = 25, FnPtr = 27, Object = 28, SzArray = 29,
  MVar = 30, CModReqd = 0x1F, CModOpt = 0x20, Internal = 33,
  Max = 34, Modifier = 0x40, Sentinel = 65, Pinned = 69
}
 
enum  CustomAttributeEncoding {
  Undefined = 0, Boolean = 2, Char = 3, SByte = 4,
  Byte = 5, Int16 = 6, UInt16 = 7, Int32 = 8,
  UInt32 = 9, Int64 = 10, UInt64 = 11, Float = 12,
  Double = 13, String = 14, Array = 29, Type = 80,
  Object = 81, Field = 83, Property = 84, Enum = 85
}
 
enum  EventAttributes { EventAttributes.None = 0x0, EventAttributes.SpecialName = 0x200, EventAttributes.ReservedMask = 0x400, EventAttributes.RTSpecialName = 0x400 }
 Specifies the attributes of an event. More...
 
enum  ExceptionHandlingClauseOptions { ExceptionHandlingClauseOptions.Clause = 0x0, ExceptionHandlingClauseOptions.Filter = 0x1, ExceptionHandlingClauseOptions.Finally = 0x2, ExceptionHandlingClauseOptions.Fault = 0x4 }
 Identifies kinds of exception-handling clauses. More...
 
enum  FieldAttributes {
  FieldAttributes.FieldAccessMask = 0x7, FieldAttributes.PrivateScope = 0x0, FieldAttributes.Private = 0x1, FieldAttributes.FamANDAssem = 0x2,
  FieldAttributes.Assembly = 0x3, FieldAttributes.Family = 0x4, FieldAttributes.FamORAssem = 0x5, FieldAttributes.Public = 0x6,
  FieldAttributes.Static = 0x10, FieldAttributes.InitOnly = 0x20, FieldAttributes.Literal = 0x40, FieldAttributes.NotSerialized = 0x80,
  FieldAttributes.SpecialName = 0x200, FieldAttributes.PinvokeImpl = 0x2000, FieldAttributes.ReservedMask = 0x9500, FieldAttributes.RTSpecialName = 0x400,
  FieldAttributes.HasFieldMarshal = 0x1000, FieldAttributes.HasDefault = 0x8000, FieldAttributes.HasFieldRVA = 0x100
}
 Specifies flags that describe the attributes of a field. More...
 
enum  GenericParameterAttributes {
  GenericParameterAttributes.None = 0x0, GenericParameterAttributes.VarianceMask = 0x3, GenericParameterAttributes.Covariant = 0x1, GenericParameterAttributes.Contravariant = 0x2,
  GenericParameterAttributes.SpecialConstraintMask = 0x1C, GenericParameterAttributes.ReferenceTypeConstraint = 0x4, GenericParameterAttributes.NotNullableValueTypeConstraint = 0x8, GenericParameterAttributes.DefaultConstructorConstraint = 0x10
}
 Describes the constraints on a generic type parameter of a generic type or method. More...
 
enum  ImageFileMachine { ImageFileMachine.I386 = 332, ImageFileMachine.IA64 = 0x200, ImageFileMachine.AMD64 = 34404, ImageFileMachine.ARM = 452 }
 Identifies the platform targeted by an executable. More...
 
enum  INVOCATION_FLAGS : uint {
  INVOCATION_FLAGS_UNKNOWN = 0x0, INVOCATION_FLAGS_INITIALIZED = 0x1, INVOCATION_FLAGS_NO_INVOKE = 0x2, INVOCATION_FLAGS_NEED_SECURITY = 0x4,
  INVOCATION_FLAGS_NO_CTOR_INVOKE = 0x8, INVOCATION_FLAGS_IS_CTOR = 0x10, INVOCATION_FLAGS_RISKY_METHOD = 0x20, INVOCATION_FLAGS_NON_W8P_FX_API = 0x40,
  INVOCATION_FLAGS_IS_DELEGATE_CTOR = 0x80, INVOCATION_FLAGS_CONTAINS_STACK_POINTERS = 0x100, INVOCATION_FLAGS_SPECIAL_FIELD = 0x10, INVOCATION_FLAGS_FIELD_SPECIAL_CAST = 0x20,
  INVOCATION_FLAGS_CONSTRUCTOR_INVOKE = 0x10000000
}
 
enum  LoadContext { DEFAULT, LOADFROM, UNKNOWN, HOSTED }
 
enum  MdSigCallingConvention : byte {
  CallConvMask = 0xF, Default = 0x0, C = 0x1, StdCall = 0x2,
  ThisCall = 0x3, FastCall = 0x4, Vararg = 0x5, Field = 0x6,
  LocalSig = 0x7, Property = 0x8, Unmgd = 0x9, GenericInst = 0xA,
  Generic = 0x10, HasThis = 0x20, ExplicitThis = 0x40
}
 
enum  MemberTypes {
  MemberTypes.Constructor = 0x1, MemberTypes.Event = 0x2, MemberTypes.Field = 0x4, MemberTypes.Method = 0x8,
  MemberTypes.Property = 0x10, MemberTypes.TypeInfo = 0x20, MemberTypes.Custom = 0x40, MemberTypes.NestedType = 0x80,
  MemberTypes.All = 0xBF
}
 Marks each type of member that is defined as a derived class of T:System.Reflection.MemberInfo. More...
 
enum  MetadataTokenType {
  Module = 0, TypeRef = 0x1000000, TypeDef = 0x2000000, FieldDef = 0x4000000,
  MethodDef = 100663296, ParamDef = 0x8000000, InterfaceImpl = 150994944, MemberRef = 167772160,
  CustomAttribute = 201326592, Permission = 234881024, Signature = 285212672, Event = 335544320,
  Property = 385875968, ModuleRef = 436207616, TypeSpec = 452984832, Assembly = 0x20000000,
  AssemblyRef = 587202560, File = 637534208, ExportedType = 654311424, ManifestResource = 671088640,
  GenericPar = 704643072, MethodSpec = 721420288, String = 1879048192, Name = 1895825408,
  BaseType = 1912602624, Invalid = int.MaxValue
}
 
enum  MethodAttributes {
  MethodAttributes.MemberAccessMask = 0x7, MethodAttributes.PrivateScope = 0x0, MethodAttributes.Private = 0x1, MethodAttributes.FamANDAssem = 0x2,
  MethodAttributes.Assembly = 0x3, MethodAttributes.Family = 0x4, MethodAttributes.FamORAssem = 0x5, MethodAttributes.Public = 0x6,
  MethodAttributes.Static = 0x10, MethodAttributes.Final = 0x20, MethodAttributes.Virtual = 0x40, MethodAttributes.HideBySig = 0x80,
  MethodAttributes.CheckAccessOnOverride = 0x200, MethodAttributes.VtableLayoutMask = 0x100, MethodAttributes.ReuseSlot = 0x0, MethodAttributes.NewSlot = 0x100,
  MethodAttributes.Abstract = 0x400, MethodAttributes.SpecialName = 0x800, MethodAttributes.PinvokeImpl = 0x2000, MethodAttributes.UnmanagedExport = 0x8,
  MethodAttributes.RTSpecialName = 0x1000, MethodAttributes.ReservedMask = 0xD000, MethodAttributes.HasSecurity = 0x4000, MethodAttributes.RequireSecObject = 0x8000
}
 Specifies flags for method attributes. These flags are defined in the corhdr.h file. More...
 
enum  MethodImplAttributes {
  MethodImplAttributes.CodeTypeMask = 3, MethodImplAttributes.IL = 0, MethodImplAttributes.Native = 1, MethodImplAttributes.OPTIL = 2,
  MethodImplAttributes.Runtime = 3, MethodImplAttributes.ManagedMask = 4, MethodImplAttributes.Unmanaged = 4, MethodImplAttributes.Managed = 0,
  MethodImplAttributes.ForwardRef = 0x10, MethodImplAttributes.PreserveSig = 0x80, MethodImplAttributes.InternalCall = 0x1000, MethodImplAttributes.Synchronized = 0x20,
  MethodImplAttributes.NoInlining = 8, MethodImplAttributes.AggressiveInlining = 0x100, MethodImplAttributes.NoOptimization = 0x40, MethodImplAttributes.MaxMethodImplVal = 0xFFFF
}
 Specifies flags for the attributes of a method implementation. More...
 
enum  MethodSemanticsAttributes {
  Setter = 0x1, Getter = 0x2, Other = 0x4, AddOn = 0x8,
  RemoveOn = 0x10, Fire = 0x20
}
 
enum  ParameterAttributes {
  ParameterAttributes.None = 0x0, ParameterAttributes.In = 0x1, ParameterAttributes.Out = 0x2, ParameterAttributes.Lcid = 0x4,
  ParameterAttributes.Retval = 0x8, ParameterAttributes.Optional = 0x10, ParameterAttributes.ReservedMask = 0xF000, ParameterAttributes.HasDefault = 0x1000,
  ParameterAttributes.HasFieldMarshal = 0x2000, ParameterAttributes.Reserved3 = 0x4000, ParameterAttributes.Reserved4 = 0x8000
}
 Defines the attributes that can be associated with a parameter. These are defined in CorHdr.h. More...
 
enum  PInvokeAttributes {
  NoMangle = 0x1, CharSetMask = 0x6, CharSetNotSpec = 0x0, CharSetAnsi = 0x2,
  CharSetUnicode = 0x4, CharSetAuto = 0x6, BestFitUseAssem = 0x0, BestFitEnabled = 0x10,
  BestFitDisabled = 0x20, BestFitMask = 0x30, ThrowOnUnmappableCharUseAssem = 0x0, ThrowOnUnmappableCharEnabled = 0x1000,
  ThrowOnUnmappableCharDisabled = 0x2000, ThrowOnUnmappableCharMask = 0x3000, SupportsLastError = 0x40, CallConvMask = 0x700,
  CallConvWinapi = 0x100, CallConvCdecl = 0x200, CallConvStdcall = 0x300, CallConvThiscall = 0x400,
  CallConvFastcall = 0x500, MaxValue = 0xFFFF
}
 
enum  PortableExecutableKinds {
  PortableExecutableKinds.NotAPortableExecutableImage = 0x0, PortableExecutableKinds.ILOnly = 0x1, PortableExecutableKinds.Required32Bit = 0x2, PortableExecutableKinds.PE32Plus = 0x4,
  PortableExecutableKinds.Unmanaged32Bit = 0x8, PortableExecutableKinds.Preferred32Bit = 0x10
}
 Identifies the nature of the code in an executable file. More...
 
enum  ProcessorArchitecture {
  ProcessorArchitecture.None, ProcessorArchitecture.MSIL, ProcessorArchitecture.X86, ProcessorArchitecture.IA64,
  ProcessorArchitecture.Amd64, ProcessorArchitecture.Arm
}
 Identifies the processor and bits-per-word of the platform targeted by an executable. More...
 
enum  PropertyAttributes {
  PropertyAttributes.None = 0x0, PropertyAttributes.SpecialName = 0x200, PropertyAttributes.ReservedMask = 0xF400, PropertyAttributes.RTSpecialName = 0x400,
  PropertyAttributes.HasDefault = 0x1000, PropertyAttributes.Reserved2 = 0x2000, PropertyAttributes.Reserved3 = 0x4000, PropertyAttributes.Reserved4 = 0x8000
}
 Defines the attributes that can be associated with a property. These attribute values are defined in corhdr.h. More...
 
enum  ResourceAttributes { ResourceAttributes.Public = 0x1, ResourceAttributes.Private = 0x2 }
 Specifies the attributes for a manifest resource. More...
 
enum  ResourceLocation { ResourceLocation.Embedded = 0x1, ResourceLocation.ContainedInAnotherAssembly = 0x2, ResourceLocation.ContainedInManifestFile = 0x4 }
 Specifies the resource location. More...
 
enum  TypeAttributes {
  TypeAttributes.VisibilityMask = 0x7, TypeAttributes.NotPublic = 0x0, TypeAttributes.Public = 0x1, TypeAttributes.NestedPublic = 0x2,
  TypeAttributes.NestedPrivate = 0x3, TypeAttributes.NestedFamily = 0x4, TypeAttributes.NestedAssembly = 0x5, TypeAttributes.NestedFamANDAssem = 0x6,
  TypeAttributes.NestedFamORAssem = 0x7, TypeAttributes.LayoutMask = 0x18, TypeAttributes.AutoLayout = 0x0, TypeAttributes.SequentialLayout = 0x8,
  TypeAttributes.ExplicitLayout = 0x10, TypeAttributes.ClassSemanticsMask = 0x20, TypeAttributes.Class = 0x0, TypeAttributes.Interface = 0x20,
  TypeAttributes.Abstract = 0x80, TypeAttributes.Sealed = 0x100, TypeAttributes.SpecialName = 0x400, TypeAttributes.Import = 0x1000,
  TypeAttributes.Serializable = 0x2000, TypeAttributes.WindowsRuntime = 0x4000, TypeAttributes.StringFormatMask = 0x30000, TypeAttributes.AnsiClass = 0x0,
  TypeAttributes.UnicodeClass = 0x10000, TypeAttributes.AutoClass = 0x20000, TypeAttributes.CustomFormatClass = 0x30000, TypeAttributes.CustomFormatMask = 0xC00000,
  TypeAttributes.BeforeFieldInit = 0x100000, TypeAttributes.ReservedMask = 0x40800, TypeAttributes.RTSpecialName = 0x800, TypeAttributes.HasSecurity = 0x40000
}
 Specifies type attributes. More...
 

Functions

delegate bool MemberFilter (MemberInfo m, object filterCriteria)
 Represents a delegate that is used to filter a list of members represented in an array of T:System.Reflection.MemberInfo objects. More...
 
delegate Module ModuleResolveEventHandler (object sender, ResolveEventArgs e)
 Represents the method that will handle the E:System.Reflection.Assembly.ModuleResolve event of an T:System.Reflection.Assembly. More...
 
delegate bool TypeFilter (Type m, object filterCriteria)
 Filters the classes represented in an array of T:System.Type objects. More...
 

Enumeration Type Documentation

◆ AssemblyContentType

Provides information about the type of code contained in an assembly.

Enumerator
Default 

The assembly contains .NET Framework code.

WindowsRuntime 

The assembly contains Windows Runtime code.

Definition at line 9 of file AssemblyContentType.cs.

◆ AssemblyNameFlags

Provides information about an T:System.Reflection.Assembly reference.

Enumerator
None 

Specifies that no flags are in effect.

PublicKey 

Specifies that a public key is formed from the full public key rather than the public key token.

EnableJITcompileOptimizer 

Specifies that just-in-time (JIT) compiler optimization is disabled for the assembly. This is the exact opposite of the meaning that is suggested by the member name.

EnableJITcompileTracking 

Specifies that just-in-time (JIT) compiler tracking is enabled for the assembly.

Retargetable 

Specifies that the assembly can be retargeted at runtime to an assembly from a different publisher. This value supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Definition at line 10 of file AssemblyNameFlags.cs.

◆ BindingFlags

Specifies flags that control binding and the way in which the search for members and types is conducted by reflection.

Enumerator
Default 

Specifies that no binding flags are defined.

IgnoreCase 

Specifies that the case of the member name should not be considered when binding.

DeclaredOnly 

Specifies that only members declared at the level of the supplied type's hierarchy should be considered. Inherited members are not considered.

Instance 

Specifies that instance members are to be included in the search.

Static 

Specifies that static members are to be included in the search.

Public 

Specifies that public members are to be included in the search.

NonPublic 

Specifies that non-public members are to be included in the search.

FlattenHierarchy 

Specifies that public and protected static members up the hierarchy should be returned. Private static members in inherited classes are not returned. Static members include fields, methods, events, and properties. Nested types are not returned.

InvokeMethod 

Specifies that a method is to be invoked. This must not be a constructor or a type initializer.This flag is passed to an InvokeMember method to invoke a method.

CreateInstance 

Specifies that reflection should create an instance of the specified type. Calls the constructor that matches the given arguments. The supplied member name is ignored. If the type of lookup is not specified, (Instance | Public) will apply. It is not possible to call a type initializer.This flag is passed to an InvokeMember method to invoke a constructor.

GetField 

Specifies that the value of the specified field should be returned.This flag is passed to an InvokeMember method to get a field value.

SetField 

Specifies that the value of the specified field should be set.This flag is passed to an InvokeMember method to set a field value.

GetProperty 

Specifies that the value of the specified property should be returned.This flag is passed to an InvokeMember method to invoke a property getter.

SetProperty 

Specifies that the value of the specified property should be set. For COM properties, specifying this binding flag is equivalent to specifying PutDispProperty and PutRefDispProperty.This flag is passed to an InvokeMember method to invoke a property setter.

PutDispProperty 

Specifies that the PROPPUT member on a COM object should be invoked. PROPPUT specifies a property-setting function that uses a value. Use PutDispProperty if a property has both PROPPUT and PROPPUTREF and you need to distinguish which one is called.

PutRefDispProperty 

Specifies that the PROPPUTREF member on a COM object should be invoked. PROPPUTREF specifies a property-setting function that uses a reference instead of a value. Use PutRefDispProperty if a property has both PROPPUT and PROPPUTREF and you need to distinguish which one is called.

ExactBinding 

Specifies that types of the supplied arguments must exactly match the types of the corresponding formal parameters. Reflection throws an exception if the caller supplies a non-null Binder object, since that implies that the caller is supplying BindToXXX implementations that will pick the appropriate method.

SuppressChangeType 

Not implemented.

OptionalParamBinding 

Returns the set of members whose parameter count matches the number of supplied arguments. This binding flag is used for methods with parameters that have default values and methods with variable arguments (varargs). This flag should only be used with M:System.Type.InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]).

IgnoreReturn 

Used in COM interop to specify that the return value of the member can be ignored.

Definition at line 10 of file BindingFlags.cs.

◆ CallingConventions

Defines the valid calling conventions for a method.

Enumerator
Standard 

Specifies the default calling convention as determined by the common language runtime. Use this calling convention for static methods. For instance or virtual methods use HasThis.

VarArgs 

Specifies the calling convention for methods with variable arguments.

Any 

Specifies that either the Standard or the VarArgs calling convention may be used.

HasThis 

Specifies an instance or virtual method (not a static method). At run-time, the called method is passed a pointer to the target object as its first argument (the this pointer). The signature stored in metadata does not include the type of this first argument, because the method is known and its owner class can be discovered from metadata.

ExplicitThis 

Specifies that the signature is a function-pointer signature, representing a call to an instance or virtual method (not a static method). If ExplicitThis is set, HasThis must also be set. The first argument passed to the called method is still a this pointer, but the type of the first argument is now unknown. Therefore, a token that describes the type (or class) of the this pointer is explicitly stored into its metadata signature.

Definition at line 10 of file CallingConventions.cs.

◆ EventAttributes

Specifies the attributes of an event.

Enumerator
None 

Specifies that the event has no attributes.

SpecialName 

Specifies that the event is special in a way described by the name.

ReservedMask 

Specifies a reserved flag for common language runtime use only.

RTSpecialName 

Specifies that the common language runtime should check name encoding.

Definition at line 10 of file EventAttributes.cs.

◆ ExceptionHandlingClauseOptions

Identifies kinds of exception-handling clauses.

Enumerator
Clause 

The clause accepts all exceptions that derive from a specified type.

Filter 

The clause contains user-specified instructions that determine whether the exception should be ignored (that is, whether normal execution should resume), be handled by the associated handler, or be passed on to the next clause.

Finally 

The clause is executed whenever the try block exits, whether through normal control flow or because of an unhandled exception.

Fault 

The clause is executed if an exception occurs, but not on completion of normal control flow.

Definition at line 8 of file ExceptionHandlingClauseOptions.cs.

◆ FieldAttributes

Specifies flags that describe the attributes of a field.

Enumerator
FieldAccessMask 

Specifies the access level of a given field.

PrivateScope 

Specifies that the field cannot be referenced.

Private 

Specifies that the field is accessible only by the parent type.

FamANDAssem 

Specifies that the field is accessible only by subtypes in this assembly.

Assembly 

Specifies that the field is accessible throughout the assembly.

Family 

Specifies that the field is accessible only by type and subtypes.

FamORAssem 

Specifies that the field is accessible by subtypes anywhere, as well as throughout this assembly.

Public 

Specifies that the field is accessible by any member for whom this scope is visible.

Static 

Specifies that the field represents the defined type, or else it is per-instance.

InitOnly 

Specifies that the field is initialized only, and can be set only in the body of a constructor.

Literal 

Specifies that the field's value is a compile-time (static or early bound) constant. Any attempt to set it throws a T:System.FieldAccessException.

NotSerialized 

Specifies that the field does not have to be serialized when the type is remoted.

SpecialName 

Specifies a special method, with the name describing how the method is special.

PinvokeImpl 

Reserved for future use.

ReservedMask 

Reserved.

RTSpecialName 

Specifies that the common language runtime (metadata internal APIs) should check the name encoding.

HasFieldMarshal 

Specifies that the field has marshaling information.

HasDefault 

Specifies that the field has a default value.

HasFieldRVA 

Specifies that the field has a relative virtual address (RVA). The RVA is the location of the method body in the current image, as an address relative to the start of the image file in which it is located.

Definition at line 10 of file FieldAttributes.cs.

◆ GenericParameterAttributes

Describes the constraints on a generic type parameter of a generic type or method.

Enumerator
None 

There are no special flags.

VarianceMask 

Selects the combination of all variance flags. This value is the result of using logical OR to combine the following flags: F:System.Reflection.GenericParameterAttributes.Contravariant and F:System.Reflection.GenericParameterAttributes.Covariant.

Covariant 

The generic type parameter is covariant. A covariant type parameter can appear as the result type of a method, the type of a read-only field, a declared base type, or an implemented interface.

Contravariant 

The generic type parameter is contravariant. A contravariant type parameter can appear as a parameter type in method signatures.

SpecialConstraintMask 

Selects the combination of all special constraint flags. This value is the result of using logical OR to combine the following flags: F:System.Reflection.GenericParameterAttributes.DefaultConstructorConstraint, F:System.Reflection.GenericParameterAttributes.ReferenceTypeConstraint, and F:System.Reflection.GenericParameterAttributes.NotNullableValueTypeConstraint.

ReferenceTypeConstraint 

A type can be substituted for the generic type parameter only if it is a reference type.

NotNullableValueTypeConstraint 

A type can be substituted for the generic type parameter only if it is a value type and is not nullable.

DefaultConstructorConstraint 

A type can be substituted for the generic type parameter only if it has a parameterless constructor.

Definition at line 6 of file GenericParameterAttributes.cs.

◆ ImageFileMachine

Identifies the platform targeted by an executable.

Enumerator
I386 

Targets a 32-bit Intel processor.

IA64 

Targets a 64-bit Intel processor.

AMD64 

Targets a 64-bit AMD processor.

ARM 

Targets an ARM processor.

Definition at line 8 of file ImageFileMachine.cs.

◆ MemberTypes

Marks each type of member that is defined as a derived class of T:System.Reflection.MemberInfo.

Enumerator
Constructor 

Specifies that the member is a constructor

Event 

Specifies that the member is an event.

Field 

Specifies that the member is a field.

Method 

Specifies that the member is a method.

Property 

Specifies that the member is a property.

TypeInfo 

Specifies that the member is a type.

Custom 

Specifies that the member is a custom member type.

NestedType 

Specifies that the member is a nested type.

All 

Specifies all member types.

Definition at line 9 of file MemberTypes.cs.

◆ MethodAttributes

Specifies flags for method attributes. These flags are defined in the corhdr.h file.

Enumerator
MemberAccessMask 

Retrieves accessibility information.

PrivateScope 

Indicates that the member cannot be referenced.

Private 

Indicates that the method is accessible only to the current class.

FamANDAssem 

Indicates that the method is accessible to members of this type and its derived types that are in this assembly only.

Assembly 

Indicates that the method is accessible to any class of this assembly.

Family 

Indicates that the method is accessible only to members of this class and its derived classes.

FamORAssem 

Indicates that the method is accessible to derived classes anywhere, as well as to any class in the assembly.

Public 

Indicates that the method is accessible to any object for which this object is in scope.

Static 

Indicates that the method is defined on the type; otherwise, it is defined per instance.

Final 

Indicates that the method cannot be overridden.

Virtual 

Indicates that the method is virtual.

HideBySig 

Indicates that the method hides by name and signature; otherwise, by name only.

CheckAccessOnOverride 

Indicates that the method can only be overridden when it is also accessible.

VtableLayoutMask 

Retrieves vtable attributes.

ReuseSlot 

Indicates that the method will reuse an existing slot in the vtable. This is the default behavior.

NewSlot 

Indicates that the method always gets a new slot in the vtable.

Abstract 

Indicates that the class does not provide an implementation of this method.

SpecialName 

Indicates that the method is special. The name describes how this method is special.

PinvokeImpl 

Indicates that the method implementation is forwarded through PInvoke (Platform Invocation Services).

UnmanagedExport 

Indicates that the managed method is exported by thunk to unmanaged code.

RTSpecialName 

Indicates that the common language runtime checks the name encoding.

ReservedMask 

Indicates a reserved flag for runtime use only.

HasSecurity 

Indicates that the method has security associated with it. Reserved flag for runtime use only.

RequireSecObject 

Indicates that the method calls another method containing security code. Reserved flag for runtime use only.

Definition at line 10 of file MethodAttributes.cs.

◆ MethodImplAttributes

Specifies flags for the attributes of a method implementation.

Enumerator
CodeTypeMask 

Specifies flags about code type.

IL 

Specifies that the method implementation is in Microsoft intermediate language (MSIL).

Native 

Specifies that the method implementation is native.

OPTIL 

Specifies that the method implementation is in Optimized Intermediate Language (OPTIL).

Runtime 

Specifies that the method implementation is provided by the runtime.

ManagedMask 

Specifies whether the method is implemented in managed or unmanaged code.

Unmanaged 

Specifies that the method is implemented in unmanaged code.

Managed 

Specifies that the method is implemented in managed code.

ForwardRef 

Specifies that the method is not defined.

PreserveSig 

Specifies that the method signature is exported exactly as declared.

InternalCall 

Specifies an internal call.

Synchronized 

Specifies that the method is single-threaded through the body. Static methods (Shared in Visual Basic) lock on the type, whereas instance methods lock on the instance. You can also use the C# lock statement or the Visual Basic SyncLock statement for this purpose.

NoInlining 

Specifies that the method cannot be inlined.

AggressiveInlining 

Specifies that the method should be inlined wherever possible.

NoOptimization 

Specifies that the method is not optimized by the just-in-time (JIT) compiler or by native code generation (see Ngen.exe) when debugging possible code generation problems.

MaxMethodImplVal 

Specifies a range check value.

Definition at line 9 of file MethodImplAttributes.cs.

◆ ParameterAttributes

Defines the attributes that can be associated with a parameter. These are defined in CorHdr.h.

Enumerator
None 

Specifies that there is no parameter attribute.

In 

Specifies that the parameter is an input parameter.

Out 

Specifies that the parameter is an output parameter.

Lcid 

Specifies that the parameter is a locale identifier (lcid).

Retval 

Specifies that the parameter is a return value.

Optional 

Specifies that the parameter is optional.

ReservedMask 

Specifies that the parameter is reserved.

HasDefault 

Specifies that the parameter has a default value.

HasFieldMarshal 

Specifies that the parameter has field marshaling information.

Reserved3 

Reserved.

Reserved4 

Reserved.

Definition at line 10 of file ParameterAttributes.cs.

◆ PortableExecutableKinds

Identifies the nature of the code in an executable file.

Enumerator
NotAPortableExecutableImage 

The file is not in portable executable (PE) file format.

ILOnly 

The executable contains only Microsoft intermediate language (MSIL), and is therefore neutral with respect to 32-bit or 64-bit platforms.

Required32Bit 

The executable can be run on a 32-bit platform, or in the 32-bit Windows on Windows (WOW) environment on a 64-bit platform.

PE32Plus 

The executable requires a 64-bit platform.

Unmanaged32Bit 

The executable contains pure unmanaged code.

Preferred32Bit 

The executable is platform-agnostic but should be run on a 32-bit platform whenever possible.

Definition at line 9 of file PortableExecutableKinds.cs.

◆ ProcessorArchitecture

Identifies the processor and bits-per-word of the platform targeted by an executable.

Enumerator
None 

An unknown or unspecified combination of processor and bits-per-word.

MSIL 

Neutral with respect to processor and bits-per-word.

X86 

A 32-bit Intel processor, either native or in the Windows on Windows environment on a 64-bit platform (WOW64).

IA64 

A 64-bit Intel processor only.

Amd64 

A 64-bit AMD processor only.

Arm 

An ARM processor.

Definition at line 9 of file ProcessorArchitecture.cs.

◆ PropertyAttributes

Defines the attributes that can be associated with a property. These attribute values are defined in corhdr.h.

Enumerator
None 

Specifies that no attributes are associated with a property.

SpecialName 

Specifies that the property is special, with the name describing how the property is special.

ReservedMask 

Specifies a flag reserved for runtime use only.

RTSpecialName 

Specifies that the metadata internal APIs check the name encoding.

HasDefault 

Specifies that the property has a default value.

Reserved2 

Reserved.

Reserved3 

Reserved.

Reserved4 

Reserved.

Definition at line 10 of file PropertyAttributes.cs.

◆ ResourceAttributes

Specifies the attributes for a manifest resource.

Enumerator
Public 

A mask used to retrieve public manifest resources.

Private 

A mask used to retrieve private manifest resources.

Definition at line 9 of file ResourceAttributes.cs.

◆ ResourceLocation

Specifies the resource location.

Enumerator
Embedded 

Specifies an embedded (that is, non-linked) resource.

ContainedInAnotherAssembly 

Specifies that the resource is contained in another assembly.

ContainedInManifestFile 

Specifies that the resource is contained in the manifest file.

Definition at line 10 of file ResourceLocation.cs.

◆ TypeAttributes

Specifies type attributes.

Enumerator
VisibilityMask 

Specifies type visibility information.

NotPublic 

Specifies that the class is not public.

Public 

Specifies that the class is public.

NestedPublic 

Specifies that the class is nested with public visibility.

NestedPrivate 

Specifies that the class is nested with private visibility.

NestedFamily 

Specifies that the class is nested with family visibility, and is thus accessible only by methods within its own type and any derived types.

NestedAssembly 

Specifies that the class is nested with assembly visibility, and is thus accessible only by methods within its assembly.

NestedFamANDAssem 

Specifies that the class is nested with assembly and family visibility, and is thus accessible only by methods lying in the intersection of its family and assembly.

NestedFamORAssem 

Specifies that the class is nested with family or assembly visibility, and is thus accessible only by methods lying in the union of its family and assembly.

LayoutMask 

Specifies class layout information.

AutoLayout 

Specifies that class fields are automatically laid out by the common language runtime.

SequentialLayout 

Specifies that class fields are laid out sequentially, in the order that the fields were emitted to the metadata.

ExplicitLayout 

Specifies that class fields are laid out at the specified offsets.

ClassSemanticsMask 

Specifies class semantics information; the current class is contextful (else agile).

Class 

Specifies that the type is a class.

Interface 

Specifies that the type is an interface.

Abstract 

Specifies that the type is abstract.

Sealed 

Specifies that the class is concrete and cannot be extended.

SpecialName 

Specifies that the class is special in a way denoted by the name.

Import 

Specifies that the class or interface is imported from another module.

Serializable 

Specifies that the class can be serialized.

WindowsRuntime 

Specifies a Windows Runtime type.

StringFormatMask 

Used to retrieve string information for native interoperability.

AnsiClass 

LPTSTR is interpreted as ANSI.

UnicodeClass 

LPTSTR is interpreted as UNICODE.

AutoClass 

LPTSTR is interpreted automatically.

CustomFormatClass 

LPSTR is interpreted by some implementation-specific means, which includes the possibility of throwing a T:System.NotSupportedException. Not used in the Microsoft implementation of the .NET Framework.

CustomFormatMask 

Used to retrieve non-standard encoding information for native interop. The meaning of the values of these 2 bits is unspecified. Not used in the Microsoft implementation of the .NET Framework.

BeforeFieldInit 

Specifies that calling static methods of the type does not force the system to initialize the type.

ReservedMask 

Attributes reserved for runtime use.

RTSpecialName 

Runtime should check name encoding.

HasSecurity 

Type has security associate with it.

Definition at line 10 of file TypeAttributes.cs.

Function Documentation

◆ MemberFilter()

delegate bool System.Reflection.MemberFilter ( MemberInfo  m,
object  filterCriteria 
)

Represents a delegate that is used to filter a list of members represented in an array of T:System.Reflection.MemberInfo objects.

Parameters
mThe T:System.Reflection.MemberInfo object to which the filter is applied.
filterCriteriaAn arbitrary object used to filter the list.
Returns
true to include the member in the filtered list; otherwise false.

◆ ModuleResolveEventHandler()

delegate Module System.Reflection.ModuleResolveEventHandler ( object  sender,
ResolveEventArgs  e 
)

Represents the method that will handle the E:System.Reflection.Assembly.ModuleResolve event of an T:System.Reflection.Assembly.

Parameters
senderThe assembly that was the source of the event.
eThe arguments supplied by the object describing the event.
Returns
The module that satisfies the request.

◆ TypeFilter()

delegate bool System.Reflection.TypeFilter ( Type  m,
object  filterCriteria 
)

Filters the classes represented in an array of T:System.Type objects.

Parameters
mThe Type object to which the filter is applied.
filterCriteriaAn arbitrary object used to filter the list.
Returns
true to include the T:System.Type in the filtered list; otherwise false.