Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Reflection.​TypeDelegator

Assembly: System.Runtime

Inheritance: object → MemberInfoTypeTypeInfo → TypeDelegator

Wraps a <see cref="T:System.Type" /> object and delegates methods to that <see langword="Type" /> .

Fields and Constants

protected Type
typeImpl
A value indicating type information.

Properties

public Assembly
Assembly
Gets the assembly of the implemented type.
public string
AssemblyQualifiedName
Gets the assembly's fully qualified name.
public Type
BaseType
Gets the base type for the current type.
public string
FullName
Gets the fully qualified name of the implemented type.
public Guid
GUID
Gets the GUID (globally unique identifier) of the implemented type.
public bool
IsByRefLike
public bool
IsCollectible
Gets the <see cref="P:System.Reflection.MemberInfo.IsCollectible" /> value for this object's <see cref="F:System.Reflection.TypeDelegator.typeImpl" /> , which indicates whether this object, which is a <see cref="T:System.Reflection.MemberInfo" /> implementation, references one or more assemblies held in a collectible <see cref="T:System.Runtime.Loader.AssemblyLoadContext" /> .
public bool
IsConstructedGenericType
Gets a value that indicates whether this object represents a constructed generic type.
public bool
IsFunctionPointer
Gets a value that indicates whether the current <see cref="T:System.Type" /> is a function pointer.
public bool
IsGenericMethodParameter
public bool
IsGenericTypeParameter
public bool
IsSZArray
public bool
IsTypeDefinition
public bool
IsUnmanagedFunctionPointer
Gets a value that indicates whether the current <see cref="T:System.Type" /> is an unmanaged function pointer.
public bool
IsVariableBoundArray
public int
MetadataToken
Gets a value that identifies this entity in metadata.
public Module
Module
Gets the module that contains the implemented type.
public string
Name
Gets the name of the implemented type, with the path removed.
public string
Namespace
Gets the namespace of the implemented type.
TypeHandle
Gets a handle to the internal metadata representation of an implemented type.
public Type
UnderlyingSystemType
Gets the underlying <see cref="T:System.Type" /> that represents the implemented type.
DeclaredConstructors
Gets a collection of the constructors declared by the current type.
Gets a collection of the events defined by the current type.
Gets a collection of the fields defined by the current type.
Gets a collection of the members defined by the current type.
Gets a collection of the methods defined by the current type.
DeclaredNestedTypes
Gets a collection of the nested types defined by the current type.
DeclaredProperties
Gets a collection of the properties defined by the current type.
public Type[]
GenericTypeParameters
Gets an array of the generic type parameters of the current instance.
ImplementedInterfaces
Gets a collection of the interfaces implemented by the current type.
Attributes
Gets the attributes associated with the <see cref="T:System.Type" /> .
public bool
ContainsGenericParameters
Gets a value indicating whether the current <see cref="T:System.Type" /> object has type parameters that have not been replaced by specific types.
public MethodBase
DeclaringMethod
Gets a <see cref="T:System.Reflection.MethodBase" /> that represents the declaring method, if the current <see cref="T:System.Type" /> represents a type parameter of a generic method.
public Type
DeclaringType
Gets the type that declares the current nested type or generic type parameter.
GenericParameterAttributes
Gets a combination of <see cref="T:System.Reflection.GenericParameterAttributes" /> flags that describe the covariance and special constraints of the current generic type parameter.
public int
GenericParameterPosition
Gets the position of the type parameter in the type parameter list of the generic type or method that declared the parameter, when the <see cref="T:System.Type" /> object represents a type parameter of a generic type or a generic method.
public Type[]
GenericTypeArguments
Gets an array of the generic type arguments for this type.
public bool
HasElementType
Gets a value indicating whether the current <see cref="T:System.Type" /> encompasses or refers to another type; that is, whether the current <see cref="T:System.Type" /> is an array, a pointer, or is passed by reference.
public bool
IsAbstract
Gets a value indicating whether the <see cref="T:System.Type" /> is abstract and must be overridden.
public bool
IsAnsiClass
Gets a value indicating whether the string format attribute <see langword="AnsiClass" /> is selected for the <see cref="T:System.Type" /> .
public bool
IsArray
Gets a value that indicates whether the type is an array.
public bool
IsAutoClass
Gets a value indicating whether the string format attribute <see langword="AutoClass" /> is selected for the <see cref="T:System.Type" /> .
public bool
IsAutoLayout
Gets a value indicating whether the fields of the current type are laid out automatically by the common language runtime.
public bool
IsByRef
Gets a value indicating whether the <see cref="T:System.Type" /> is passed by reference.
public bool
IsClass
Gets a value indicating whether the <see cref="T:System.Type" /> is a class or a delegate; that is, not a value type or interface.
public bool
IsCOMObject
Gets a value indicating whether the <see cref="T:System.Type" /> is a COM object.
public bool
IsContextful
Gets a value indicating whether the <see cref="T:System.Type" /> can be hosted in a context.
public bool
IsEnum
Gets a value indicating whether the current <see cref="T:System.Type" /> represents an enumeration.
public bool
IsExplicitLayout
Gets a value indicating whether the fields of the current type are laid out at explicitly specified offsets.
public bool
IsGenericParameter
Gets a value indicating whether the current <see cref="T:System.Type" /> represents a type parameter in the definition of a generic type or method.
public bool
IsGenericType
Gets a value indicating whether the current type is a generic type.
public bool
IsGenericTypeDefinition
Gets a value indicating whether the current <see cref="T:System.Type" /> represents a generic type definition, from which other generic types can be constructed.
public bool
IsImport
Gets a value indicating whether the <see cref="T:System.Type" /> has a <see cref="T:System.Runtime.InteropServices.ComImportAttribute" /> attribute applied, indicating that it was imported from a COM type library.
public bool
IsInterface
Gets a value indicating whether the <see cref="T:System.Type" /> is an interface; that is, not a class or a value type.
public bool
IsLayoutSequential
Gets a value indicating whether the fields of the current type are laid out sequentially, in the order that they were defined or emitted to the metadata.
public bool
IsMarshalByRef
Gets a value indicating whether the <see cref="T:System.Type" /> is marshaled by reference.
public bool
IsNested
Gets a value indicating whether the current <see cref="T:System.Type" /> object represents a type whose definition is nested inside the definition of another type.
public bool
IsNestedAssembly
Gets a value indicating whether the <see cref="T:System.Type" /> is nested and visible only within its own assembly.
public bool
IsNestedFamANDAssem
Gets a value indicating whether the <see cref="T:System.Type" /> is nested and visible only to classes that belong to both its own family and its own assembly.
public bool
IsNestedFamily
Gets a value indicating whether the <see cref="T:System.Type" /> is nested and visible only within its own family.
public bool
IsNestedFamORAssem
Gets a value indicating whether the <see cref="T:System.Type" /> is nested and visible only to classes that belong to either its own family or to its own assembly.
public bool
IsNestedPrivate
Gets a value indicating whether the <see cref="T:System.Type" /> is nested and declared private.
public bool
IsNestedPublic
Gets a value indicating whether a class is nested and declared public.
public bool
IsNotPublic
Gets a value indicating whether the <see cref="T:System.Type" /> is not declared public.
public bool
IsPointer
Gets a value indicating whether the <see cref="T:System.Type" /> is a pointer.
public bool
IsPrimitive
Gets a value indicating whether the <see cref="T:System.Type" /> is one of the primitive types.
public bool
IsPublic
Gets a value indicating whether the <see cref="T:System.Type" /> is declared public.
public bool
IsSealed
Gets a value indicating whether the <see cref="T:System.Type" /> is declared sealed.
public bool
IsSecurityCritical
Gets a value that indicates whether the current type is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.
public bool
IsSecuritySafeCritical
Gets a value that indicates whether the current type is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code.
public bool
IsSecurityTransparent
Gets a value that indicates whether the current type is transparent at the current trust level, and therefore cannot perform critical operations.
public bool
IsSerializable
Gets a value indicating whether the <see cref="T:System.Type" /> is binary serializable.
public bool
IsSignatureType
Gets a value that indicates whether the type is a signature type.
public bool
IsSpecialName
Gets a value indicating whether the type has a name that requires special handling.
public bool
IsUnicodeClass
Gets a value indicating whether the string format attribute <see langword="UnicodeClass" /> is selected for the <see cref="T:System.Type" /> .
public bool
IsValueType
Gets a value indicating whether the <see cref="T:System.Type" /> is a value type.
public bool
IsVisible
Gets a value indicating whether the <see cref="T:System.Type" /> can be accessed by code outside the assembly.
public MemberTypes
MemberType
Gets a <see cref="T:System.Reflection.MemberTypes" /> value indicating that this member is a type or a nested type.
public Type
ReflectedType
Gets the class object that was used to obtain this member.
Gets a <see cref="T:System.Runtime.InteropServices.StructLayoutAttribute" /> that describes the layout of the current type.
TypeInitializer
Gets the initializer for the type.
CustomAttributes
Gets a collection that contains this member's custom attributes.

Methods

protected TypeAttributes
GetAttributeFlagsImpl​()
Returns A <see langword="TypeAttributes" /> object representing the implementation attribute flags.
Gets the attributes assigned to the <see langword="TypeDelegator" /> .
protected ConstructorInfo
GetConstructorImpl​(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
binder An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see langword="MemberInfo" /> objects using reflection. If <paramref name="binder" /> is <see langword="null" /> , the default binder is used.
callConvention The calling conventions.
types An array of type <see langword="Type" /> containing a list of the parameter number, order, and types. Types cannot be <see langword="null" /> ; use an appropriate <see langword="GetMethod" /> method or an empty array to search for a method without parameters.
modifiers An array of type <see langword="ParameterModifier" /> having the same length as the <paramref name="types" /> array, whose elements represent the attributes associated with the parameters of the method to get.
Returns A <see langword="ConstructorInfo" /> object for the method that matches the specified criteria, or <see langword="null" /> if a match cannot be found.
Gets the constructor that implemented the <see langword="TypeDelegator" /> .
public ConstructorInfo[]
GetConstructors​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of type <see langword="ConstructorInfo" /> containing the specified constructors defined for this class. If no constructors are defined, an empty array is returned. Depending on the value of a specified parameter, only public constructors or both public and non-public constructors will be returned.
Returns an array of <see cref="T:System.Reflection.ConstructorInfo" /> objects representing constructors defined for the type wrapped by the current <see cref="T:System.Reflection.TypeDelegator" /> .
public object[]
GetCustomAttributes​(bool inherit)
inherit Specifies whether to search this type's inheritance chain to find the attributes.
Returns An array of objects containing all the custom attributes defined for this type.
Returns all the custom attributes defined for this type, specifying whether to search the type's inheritance chain.
public object[]
GetCustomAttributes​(Type attributeType, bool inherit)
attributeType An array of custom attributes identified by type.
inherit Specifies whether to search this type's inheritance chain to find the attributes.
Returns An array of objects containing the custom attributes defined in this type that match the <paramref name="attributeType" /> parameter, specifying whether to search the type's inheritance chain, or <see langword="null" /> if no custom attributes are defined on this type.
Returns an array of custom attributes identified by type.
public Type
GetElementType​()
Returns The <see cref="T:System.Type" /> of the object encompassed or referred to by the current array, pointer or <see langword="ByRef" /> , or <see langword="null" /> if the current <see cref="T:System.Type" /> is not an array, a pointer or a <see langword="ByRef" /> .
Returns the <see cref="T:System.Type" /> of the object encompassed or referred to by the current array, pointer or ByRef.
public EventInfo
GetEvent​(string name, BindingFlags bindingAttr)
name The name of the event to get.
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An <see cref="T:System.Reflection.EventInfo" /> object representing the event declared or inherited by this type with the specified name. This method returns <see langword="null" /> if no such event is found.
Returns the specified event.
public EventInfo[]
GetEvents​()
Returns An array that contains all the events declared or inherited by the current type. If there are no events, an empty array is returned.
Returns an array of <see cref="T:System.Reflection.EventInfo" /> objects representing all the public events declared or inherited by the current <see langword="TypeDelegator" /> .
public EventInfo[]
GetEvents​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of type <see langword="EventInfo" /> containing the events specified in <paramref name="bindingAttr" /> . If there are no events, an empty array is returned.
Returns the events specified in <paramref name="bindingAttr" /> that are declared or inherited by the current <see langword="TypeDelegator" /> .
public FieldInfo
GetField​(string name, BindingFlags bindingAttr)
name The name of the field to find.
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns A <see langword="FieldInfo" /> object representing the field declared or inherited by this <see langword="TypeDelegator" /> with the specified name. Returns <see langword="null" /> if no such field is found.
Returns a <see cref="T:System.Reflection.FieldInfo" /> object representing the field with the specified name.
public FieldInfo[]
GetFields​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of type <see langword="FieldInfo" /> containing the fields declared or inherited by the current <see langword="TypeDelegator" /> . An empty array is returned if there are no matched fields.
Returns an array of <see cref="T:System.Reflection.FieldInfo" /> objects representing the data fields defined for the type wrapped by the current <see cref="T:System.Reflection.TypeDelegator" /> .
public Type[]
GetFunctionPointerCallingConventions​()
Returns <para>An array of <see cref="T:System.Type" /> objects representing all the calling conventions for the current function pointer <see cref="T:System.Type" />.</para> <para>-or-</para> <para>An empty array of type <see cref="T:System.Type" />, if no calling conventions are defined for the current function pointer <see cref="T:System.Type" />.</para> <para>-or-</para> <para>An empty array of type <see cref="T:System.Type" />, if the current function pointer <see cref="T:System.Type" /> is not a modified <see cref="T:System.Type" />. A modified <see cref="T:System.Type" /> is obtained from <see cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" />, <see cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" />, or <see cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" />.</para>
When overridden in a derived class, returns the calling conventions of the current function pointer <see cref="T:System.Type" /> .
public Type[]
GetFunctionPointerParameterTypes​()
Returns <para>An array of <see cref="T:System.Type" /> objects representing all the parameter types for the current function pointer <see cref="T:System.Type" />.</para> <para>-or-</para> <para>An empty array of type <see cref="T:System.Type" />, if no parameters are defined for the current function pointer <see cref="T:System.Type" />.</para>
When overridden in a derived class, returns the parameter types of the current function pointer <see cref="T:System.Type" /> .
public Type
GetFunctionPointerReturnType​()
Returns A <see cref="T:System.Type" /> object representing the return type for the current function pointer <see cref="T:System.Type" /> .
When overridden in a derived class, returns the return type of the current function pointer <see cref="T:System.Type" /> .
public Type
GetInterface​(string name, bool ignoreCase)
name The fully qualified name of the interface implemented by the current class.
ignoreCase <see langword="true" /> if the case is to be ignored; otherwise, <see langword="false" /> .
Returns A <see langword="Type" /> object representing the interface implemented (directly or indirectly) by the current class with the fully qualified name matching the specified name. If no interface that matches name is found, null is returned.
Returns the specified interface implemented by the type wrapped by the current <see cref="T:System.Reflection.TypeDelegator" /> .
GetInterfaceMap​(Type interfaceType)
interfaceType The <see cref="T:System.Type" /> of the interface to retrieve a mapping of.
Returns An <see cref="T:System.Reflection.InterfaceMapping" /> object representing the interface mapping for <paramref name="interfaceType" /> .
Returns an interface mapping for the specified interface type.
public Type[]
GetInterfaces​()
Returns An array of type <see langword="Type" /> containing all the interfaces implemented on the current class and its base classes. If none are defined, an empty array is returned.
Returns all the interfaces implemented on the current class and its base classes.
public MemberInfo[]
GetMember​(string name, MemberTypes type, BindingFlags bindingAttr)
name The name of the member to get.
type A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
bindingAttr The type of members to get.
Returns An array of type <see langword="MemberInfo" /> containing all the members of the current class and its base class meeting the specified criteria.
Returns members (properties, methods, constructors, fields, events, and nested types) specified by the given <paramref name="name" /> , <paramref name="type" /> , and <paramref name="bindingAttr" /> .
public MemberInfo[]
GetMembers​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of type <see langword="MemberInfo" /> containing all the members of the current class and its base classes that meet the <paramref name="bindingAttr" /> filter.
Returns members specified by <paramref name="bindingAttr" /> .
public MemberInfo
GetMemberWithSameMetadataDefinitionAs​(MemberInfo member)
member The <see cref="T:System.Reflection.MemberInfo" /> to find on the current <see cref="T:System.Type" /> .
Returns An object representing the member on the current <see cref="T:System.Type" /> that matches the specified member.
Searches for the <see cref="T:System.Reflection.MemberInfo" /> on the current <see cref="T:System.Type" /> that matches the specified <see cref="T:System.Reflection.MemberInfo" /> .
protected MethodInfo
GetMethodImpl​(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
name The method name.
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
binder An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see langword="MemberInfo" /> objects using reflection. If <paramref name="binder" /> is <see langword="null" /> , the default binder is used.
callConvention The calling conventions.
types An array of type <see langword="Type" /> containing a list of the parameter number, order, and types. Types cannot be <see langword="null" /> ; use an appropriate <see langword="GetMethod" /> method or an empty array to search for a method without parameters.
modifiers An array of type <see langword="ParameterModifier" /> having the same length as the <paramref name="types" /> array, whose elements represent the attributes associated with the parameters of the method to get.
Returns A <see langword="MethodInfoInfo" /> object for the implementation method that matches the specified criteria, or <see langword="null" /> if a match cannot be found.
Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
public MethodInfo[]
GetMethods​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of <see langword="MethodInfo" /> objects representing the methods defined on this <see langword="TypeDelegator" /> .
Returns an array of <see cref="T:System.Reflection.MethodInfo" /> objects representing specified methods of the type wrapped by the current <see cref="T:System.Reflection.TypeDelegator" /> .
public Type
GetNestedType​(string name, BindingFlags bindingAttr)
name The nested type's name.
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns A <see langword="Type" /> object representing the nested type.
Returns a nested type specified by <paramref name="name" /> and in <paramref name="bindingAttr" /> that are declared or inherited by the type represented by the current <see cref="T:System.Reflection.TypeDelegator" /> .
public Type[]
GetNestedTypes​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of type <see langword="Type" /> containing the nested types.
Returns the nested types specified in <paramref name="bindingAttr" /> that are declared or inherited by the type wrapped by the current <see cref="T:System.Reflection.TypeDelegator" /> .
public PropertyInfo[]
GetProperties​(BindingFlags bindingAttr)
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
Returns An array of <see langword="PropertyInfo" /> objects representing properties defined on this <see langword="TypeDelegator" /> .
Returns an array of <see cref="T:System.Reflection.PropertyInfo" /> objects representing properties of the type wrapped by the current <see cref="T:System.Reflection.TypeDelegator" /> .
protected PropertyInfo
GetPropertyImpl​(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
name The property to get.
bindingAttr A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from <see cref="T:System.Reflection.BindingFlags" /> .
binder An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see langword="MemberInfo" /> objects via reflection. If <paramref name="binder" /> is <see langword="null" /> , the default binder is used. See <see cref="T:System.Reflection.Binder" /> .
returnType The return type of the property.
types A list of parameter types. The list represents the number, order, and types of the parameters. Types cannot be null; use an appropriate <see langword="GetMethod" /> method or an empty array to search for a method without parameters.
modifiers An array of the same length as types with elements that represent the attributes associated with the parameters of the method to get.
Returns A <see cref="T:System.Reflection.PropertyInfo" /> object for the property that matches the specified criteria, or null if a match cannot be found.
When overridden in a derived class, searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.
protected bool
HasElementTypeImpl​()
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is an array, a pointer or a ByRef; otherwise, <see langword="false" /> .
Gets a value indicating whether the current <see cref="T:System.Type" /> encompasses or refers to another type; that is, whether the current <see cref="T:System.Type" /> is an array, a pointer or a ByRef.
public object
InvokeMember​(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, Globalization.CultureInfo culture, string[] namedParameters)
name The name of the member to invoke. This may be a constructor, method, property, or field. If an empty string ("") is passed, the default member is invoked.
invokeAttr The invocation attribute. This must be one of the following <see cref="T:System.Reflection.BindingFlags" /> : <see langword="InvokeMethod" /> , <see langword="CreateInstance" /> , <see langword="Static" /> , <see langword="GetField" /> , <see langword="SetField" /> , <see langword="GetProperty" /> , or <see langword="SetProperty" /> . A suitable invocation attribute must be specified. If a static member is to be invoked, the <see langword="Static" /> flag must be set.
binder An object that enables the binding, coercion of argument types, invocation of members, and retrieval of <see langword="MemberInfo" /> objects via reflection. If <paramref name="binder" /> is <see langword="null" /> , the default binder is used. See <see cref="T:System.Reflection.Binder" /> .
target The object on which to invoke the specified member.
args An array of type <see langword="Object" /> that contains the number, order, and type of the parameters of the member to be invoked. If <paramref name="args" /> contains an uninitialized <see langword="Object" /> , it is treated as empty, which, with the default binder, can be widened to 0, 0.0 or a string.
modifiers An array of type <see langword="ParameterModifier" /> that is the same length as <paramref name="args" /> , with elements that represent the attributes associated with the arguments of the member to be invoked. A parameter has attributes associated with it in the member's signature. For ByRef, use <see langword="ParameterModifier.ByRef" /> , and for none, use <see langword="ParameterModifier.None" /> . The default binder does exact matching on these. Attributes such as <see langword="In" /> and <see langword="InOut" /> are not used in binding, and can be viewed using <see langword="ParameterInfo" /> .
culture An instance of <see langword="CultureInfo" /> used to govern the coercion of types. This is necessary, for example, to convert a string that represents 1000 to a <see cref="T:System.Double" /> value, since 1000 is represented differently by different cultures. If <paramref name="culture" /> is <see langword="null" /> , the <see cref="T:System.Globalization.CultureInfo" /> for the current thread's <see cref="T:System.Globalization.CultureInfo" /> is used.
namedParameters A string array containing parameter names that match up, starting at element zero, with the <paramref name="args" /> array. There must be no holes in the array. If <paramref name="args" /> . <see langword="Length" /> is greater than <paramref name="namedParameters" /> . <see langword="Length" /> , the remaining parameters are filled in order.
Returns An <see langword="Object" /> representing the return value of the invoked member.
Invokes the specified member. The method that is to be invoked must be accessible and provide the most specific match with the specified argument list, under the constraints of the specified binder and invocation attributes.
protected bool
IsArrayImpl​()
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is an array; otherwise, <see langword="false" /> .
Returns a value that indicates whether the <see cref="T:System.Type" /> is an array.
public bool
IsAssignableFrom​(TypeInfo typeInfo)
typeInfo The type to check.
Returns <see langword="true" /> if the specified type can be assigned to this type; otherwise, <see langword="false" /> .
Returns a value that indicates whether the specified type can be assigned to this type.
protected bool
IsByRefImpl​()
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is passed by reference; otherwise, <see langword="false" /> .
Returns a value that indicates whether the <see cref="T:System.Type" /> is passed by reference.
protected bool
IsCOMObjectImpl​()
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is a COM object; otherwise, <see langword="false" /> .
Returns a value that indicates whether the <see cref="T:System.Type" /> is a COM object.
public bool
IsDefined​(Type attributeType, bool inherit)
attributeType Specifies whether to search this type's inheritance chain to find the attributes.
inherit An array of custom attributes identified by type.
Returns <see langword="true" /> if a custom attribute identified by <paramref name="attributeType" /> is defined; otherwise, <see langword="false" /> .
Indicates whether a custom attribute identified by <paramref name="attributeType" /> is defined.
protected bool
IsPointerImpl​()
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is a pointer; otherwise, <see langword="false" /> .
Returns a value that indicates whether the <see cref="T:System.Type" /> is a pointer.
protected bool
IsPrimitiveImpl​()
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is one of the primitive types; otherwise, <see langword="false" /> .
Returns a value that indicates whether the <see cref="T:System.Type" /> is one of the primitive types.
protected bool
IsValueTypeImpl​()
Returns <see langword="true" /> if the type is a value type; otherwise, <see langword="false" /> .
Returns a value that indicates whether the type is a value type; that is, not a class or an interface.
public Type
AsType​()
Inherited from TypeInfo
Returns The current type.
Returns the current type as a <see cref="T:System.Type" /> object.
public EventInfo
GetDeclaredEvent​(string name)
Inherited from TypeInfo
name The name of the event.
Returns An object that represents the specified event, if found; otherwise, <see langword="null" /> .
Returns an object that represents the specified event declared by the current type.
public FieldInfo
GetDeclaredField​(string name)
Inherited from TypeInfo
name The name of the field.
Returns An object that represents the specified field, if found; otherwise, <see langword="null" /> .
Returns an object that represents the specified field declared by the current type.
public MethodInfo
GetDeclaredMethod​(string name)
Inherited from TypeInfo
name The name of the method.
Returns An object that represents the specified method, if found; otherwise, <see langword="null" /> .
Returns an object that represents the specified method declared by the current type.
GetDeclaredMethods​(string name)
Inherited from TypeInfo
name The method name to search for.
Returns A collection that contains methods that match <paramref name="name" /> .
Returns a collection that contains all methods declared on the current type that match the specified name.
public TypeInfo
GetDeclaredNestedType​(string name)
Inherited from TypeInfo
name The name of the nested type.
Returns An object that represents the specified nested type, if found; otherwise, <see langword="null" /> .
Returns an object that represents the specified nested type declared by the current type.
public PropertyInfo
GetDeclaredProperty​(string name)
Inherited from TypeInfo
name The name of the property.
Returns An object that represents the specified property, if found; otherwise, <see langword="null" /> .
Returns an object that represents the specified property declared by the current type.
public bool
Equals​(object o)
Inherited from Type
o The object whose underlying system type is to be compared with the underlying system type of the current <see cref="T:System.Type" /> . For the comparison to succeed, <paramref name="o" /> must be able to be cast or converted to an object of type <see cref="T:System.Type" /> .
Returns <see langword="true" /> if the underlying system type of <paramref name="o" /> is the same as the underlying system type of the current <see cref="T:System.Type" /> ; otherwise, <see langword="false" /> . This method also returns <see langword="false" /> if: - <paramref name="o" /> is <see langword="null" /> . - <paramref name="o" /> cannot be cast or converted to a <see cref="T:System.Type" /> object.
Determines if the underlying system type of the current <see cref="T:System.Type" /> object is the same as the underlying system type of the specified <see cref="T:System.Object" /> .
public bool
Equals​(Type o)
Inherited from Type
o The object whose underlying system type is to be compared with the underlying system type of the current <see cref="T:System.Type" /> .
Returns <see langword="true" /> if the underlying system type of <paramref name="o" /> is the same as the underlying system type of the current <see cref="T:System.Type" /> ; otherwise, <see langword="false" /> .
Determines if the underlying system type of the current <see cref="T:System.Type" /> is the same as the underlying system type of the specified <see cref="T:System.Type" /> .
public Type[]
FindInterfaces​(TypeFilter filter, object filterCriteria)
Inherited from Type
filter The delegate that compares the interfaces against <paramref name="filterCriteria" /> .
filterCriteria The search criteria that determines whether an interface should be included in the returned array.
Returns An array of <see cref="T:System.Type" /> objects representing a filtered list of the interfaces implemented or inherited by the current <see cref="T:System.Type" /> , or an empty array if no interfaces matching the filter are implemented or inherited by the current <see cref="T:System.Type" /> .
Returns an array of <see cref="T:System.Type" /> objects representing a filtered list of interfaces implemented or inherited by the current <see cref="T:System.Type" /> .
public MemberInfo[]
FindMembers​(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria)
Inherited from Type
memberType A bitwise combination of the enumeration values that indicates the type of member to search for.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
filter The delegate that does the comparisons, returning <see langword="true" /> if the member currently being inspected matches the <paramref name="filterCriteria" /> and <see langword="false" /> otherwise.
filterCriteria The search criteria that determines whether a member is returned in the array of <see langword="MemberInfo" /> objects. The fields of <see langword="FieldAttributes" /> , <see langword="MethodAttributes" /> , and <see langword="MethodImplAttributes" /> can be used in conjunction with the <see langword="FilterAttribute" /> delegate supplied by this class.
Returns A filtered array of <see cref="T:System.Reflection.MemberInfo" /> objects of the specified member type. -or- An empty array if the current <see cref="T:System.Type" /> does not have members of type <paramref name="memberType" /> that match the filter criteria.
Returns a filtered array of <see cref="T:System.Reflection.MemberInfo" /> objects of the specified member type.
public int
GetArrayRank​()
Inherited from Type
Returns An integer that contains the number of dimensions in the current type.
Gets the number of dimensions in an array.
GetConstructor​(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
callConvention The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and the stack is cleaned up.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the constructor to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a constructor that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. The default binder does not process this parameter.
Returns An object representing the constructor that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
GetConstructor​(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the constructor to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a constructor that takes no parameters. -or- <see cref="F:System.Type.EmptyTypes" /> .
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the parameter type array. The default binder does not process this parameter.
Returns A <see cref="T:System.Reflection.ConstructorInfo" /> object representing the constructor that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints.
GetConstructor​(BindingFlags bindingAttr, Type[] types)
Inherited from Type
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- Default to return <see langword="null" /> .
types An array of Type objects representing the number, order, and type of the parameters for the constructor to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = Array.Empty{Type}()) to get a constructor that takes no parameters. -or- <see cref="F:System.Type.EmptyTypes" /> .
Returns A <see cref="T:System.Reflection.ConstructorInfo" /> object representing the constructor that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for a constructor whose parameters match the specified argument types, using the specified binding constraints.
GetConstructor​(Type[] types)
Inherited from Type
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the desired constructor. -or- An empty array of <see cref="T:System.Type" /> objects, to get a constructor that takes no parameters. Such an empty array is provided by the <see langword="static" /> field <see cref="F:System.Type.EmptyTypes" /> .
Returns An object representing the public instance constructor whose parameters match the types in the parameter type array, if found; otherwise, <see langword="null" /> .
Searches for a public instance constructor whose parameters match the types in the specified array.
public ConstructorInfo[]
GetConstructors​()
Inherited from Type
Returns An array of <see cref="T:System.Reflection.ConstructorInfo" /> objects representing all the public instance constructors defined for the current <see cref="T:System.Type" /> , but not including the type initializer (static constructor). If no public instance constructors are defined for the current <see cref="T:System.Type" /> , or if the current <see cref="T:System.Type" /> represents a type parameter in the definition of a generic type or generic method, an empty array of type <see cref="T:System.Reflection.ConstructorInfo" /> is returned.
Returns all the public constructors defined for the current <see cref="T:System.Type" /> .
public MemberInfo[]
GetDefaultMembers​()
Inherited from Type
Returns An array of <see cref="T:System.Reflection.MemberInfo" /> objects representing all default members of the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Reflection.MemberInfo" /> , if the current <see cref="T:System.Type" /> does not have default members.
Searches for the members defined for the current <see cref="T:System.Type" /> whose <see cref="T:System.Reflection.DefaultMemberAttribute" /> is set.
public string
GetEnumName​(object value)
Inherited from Type
value The value whose name is to be retrieved.
Returns The name of the member of the current enumeration type that has the specified value, or <see langword="null" /> if no such constant is found.
Returns the name of the constant that has the specified value, for the current enumeration type.
public string[]
GetEnumNames​()
Inherited from Type
Returns An array that contains the names of the members of the enumeration.
Returns the names of the members of the current enumeration type.
public Type
GetEnumUnderlyingType​()
Inherited from Type
Returns The underlying type of the current enumeration.
Returns the underlying type of the current enumeration type.
public Array
GetEnumValues​()
Inherited from Type
Returns An array that contains the values. The elements of the array are sorted by the binary values (that is, the unsigned values) of the enumeration constants.
Returns an array of the values of the constants in the current enumeration type.
public Array
GetEnumValuesAsUnderlyingType​()
Inherited from Type
Returns An array that contains the values of the underlying type constants in this enumeration type.
Retrieves an array of the values of the underlying type constants of this enumeration type.
public EventInfo
GetEvent​(string name)
Inherited from Type
name The string containing the name of an event that is declared or inherited by the current <see cref="T:System.Type" /> .
Returns The object representing the specified public event that is declared or inherited by the current <see cref="T:System.Type" /> , if found; otherwise, <see langword="null" /> .
Returns the <see cref="T:System.Reflection.EventInfo" /> object representing the specified public event.
public FieldInfo
GetField​(string name)
Inherited from Type
name The string containing the name of the data field to get.
Returns An object representing the public field with the specified name, if found; otherwise, <see langword="null" /> .
Searches for the public field with the specified name.
public FieldInfo[]
GetFields​()
Inherited from Type
Returns An array of <see cref="T:System.Reflection.FieldInfo" /> objects representing all the public fields defined for the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Reflection.FieldInfo" /> , if no public fields are defined for the current <see cref="T:System.Type" /> .
Returns all the public fields of the current <see cref="T:System.Type" /> .
public Type[]
GetGenericArguments​()
Inherited from Type
Returns An array of <see cref="T:System.Type" /> objects that represent the type arguments of a generic type. Returns an empty array if the current type is not a generic type.
Returns an array of <see cref="T:System.Type" /> objects that represent the type arguments of a closed generic type or the type parameters of a generic type definition.
public Type[]
GetGenericParameterConstraints​()
Inherited from Type
Returns An array of <see cref="T:System.Type" /> objects that represent the constraints on the current generic type parameter.
Returns an array of <see cref="T:System.Type" /> objects that represent the constraints on the current generic type parameter.
public Type
GetGenericTypeDefinition​()
Inherited from Type
Returns A <see cref="T:System.Type" /> object representing a generic type from which the current type can be constructed.
Returns a <see cref="T:System.Type" /> object that represents a generic type definition from which the current generic type can be constructed.
public int
GetHashCode​()
Inherited from Type
Returns The hash code for this instance.
Returns the hash code for this instance.
public Type
GetInterface​(string name)
Inherited from Type
name The string containing the name of the interface to get. For generic interfaces, this is the mangled name.
Returns An object representing the interface with the specified name, implemented or inherited by the current <see cref="T:System.Type" /> , if found; otherwise, <see langword="null" /> .
Searches for the interface with the specified name.
public MemberInfo[]
GetMember​(string name)
Inherited from Type
name The string containing the name of the public members to get.
Returns An array of <see cref="T:System.Reflection.MemberInfo" /> objects representing the public members with the specified name, if found; otherwise, an empty array.
Searches for the public members with the specified name.
public MemberInfo[]
GetMember​(string name, BindingFlags bindingAttr)
Inherited from Type
name The string containing the name of the members to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return an empty array.
Returns An array of <see cref="T:System.Reflection.MemberInfo" /> objects representing the public members with the specified name, if found; otherwise, an empty array.
Searches for the specified members, using the specified binding constraints.
public MemberInfo[]
GetMembers​()
Inherited from Type
Returns An array of <see cref="T:System.Reflection.MemberInfo" /> objects representing all the public members of the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Reflection.MemberInfo" /> , if the current <see cref="T:System.Type" /> does not have public members.
Returns all the public members of the current <see cref="T:System.Type" /> .
public MethodInfo
GetMethod​(string name)
Inherited from Type
name The string containing the name of the public method to get.
Returns An object that represents the public method with the specified name, if found; otherwise, <see langword="null" /> .
Searches for the public method with the specified name.
public MethodInfo
GetMethod​(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the public method to get.
genericParameterCount The number of generic type parameters of the method.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
callConvention The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and how the stack is cleaned up.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. To be only used when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Returns An object representing the method that matches the specified generic parameter count, argument types, modifiers, binding constraints and calling convention, if found; otherwise, <see langword="null" /> .
Searches for the specified method whose parameters match the specified generic parameter count, argument types and modifiers, using the specified binding constraints and the specified calling convention.
public MethodInfo
GetMethod​(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the public method to get.
genericParameterCount The number of generic type parameters of the method.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. To be only used when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Returns An object representing the method that matches the specified generic parameter count, argument types, modifiers and binding constraints, if found; otherwise, <see langword="null" /> .
Searches for the specified method whose parameters match the specified generic parameter count, argument types and modifiers, using the specified binding constraints.
public MethodInfo
GetMethod​(string name, int genericParameterCount, BindingFlags bindingAttr, Type[] types)
Inherited from Type
name The string containing the name of the method to get.
genericParameterCount The number of generic type parameters of the method.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
Returns An object representing the method that matches the specified generic parameter count, argument types, and binding constraints, if found; otherwise, <see langword="null" /> .
Searches for the specified method whose parameters match the specified generic parameter count and argument types, using the specified binding constraints.
public MethodInfo
GetMethod​(string name, int genericParameterCount, Type[] types)
Inherited from Type
name The string containing the name of the public method to get.
genericParameterCount The number of generic type parameters of the method.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
Returns An object representing the public method whose parameters match the specified generic parameter count and argument types, if found; otherwise, <see langword="null" /> .
Searches for the specified public method whose parameters match the specified generic parameter count and argument types.
public MethodInfo
GetMethod​(string name, int genericParameterCount, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the public method to get.
genericParameterCount The number of generic type parameters of the method.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. To be only used when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Returns An object representing the public method that matches the specified generic parameter count, argument types and modifiers, if found; otherwise, <see langword="null" /> .
Searches for the specified public method whose parameters match the specified generic parameter count, argument types and modifiers.
public MethodInfo
GetMethod​(string name, BindingFlags bindingAttr)
Inherited from Type
name The string containing the name of the method to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
Returns An object representing the method that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified method, using the specified binding constraints.
public MethodInfo
GetMethod​(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the method to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
callConvention The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and how the stack is cleaned up.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. To be only used when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Returns An object representing the method that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
public MethodInfo
GetMethod​(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the method to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. To be only used when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Returns An object representing the method that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints.
public MethodInfo
GetMethod​(string name, BindingFlags bindingAttr, Type[] types)
Inherited from Type
name The string containing the name of the method to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- Default to return <see langword="null" /> .
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
Returns An object representing the method that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified method whose parameters match the specified argument types, using the specified binding constraints.
public MethodInfo
GetMethod​(string name, Type[] types)
Inherited from Type
name The string containing the name of the public method to get.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
Returns An object representing the public method whose parameters match the specified argument types, if found; otherwise, <see langword="null" /> .
Searches for the specified public method whose parameters match the specified argument types.
public MethodInfo
GetMethod​(string name, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the public method to get.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of <see cref="T:System.Type" /> objects (as provided by the <see cref="F:System.Type.EmptyTypes" /> field) to get a method that takes no parameters.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. To be only used when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Returns An object representing the public method that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified public method whose parameters match the specified argument types and modifiers.
protected MethodInfo
GetMethodImpl​(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the method to get.
genericParameterCount The number of generic type parameters of the method.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
callConvention The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and what process cleans up the stack.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a method that takes no parameters. -or- <see langword="null" /> . If <paramref name="types" /> is <see langword="null" /> , arguments are not matched.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. The default binder does not process this parameter.
Returns An object representing the method that matches the specified generic parameter count, argument types, modifiers, binding constraints and calling convention, if found; otherwise, <see langword="null" /> .
When overridden in a derived class, searches for the specified method whose parameters match the specified generic parameter count, argument types and modifiers, using the specified binding constraints and the specified calling convention.
public MethodInfo[]
GetMethods​()
Inherited from Type
Returns An array of <see cref="T:System.Reflection.MethodInfo" /> objects representing all the public methods defined for the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Reflection.MethodInfo" /> , if no public methods are defined for the current <see cref="T:System.Type" /> .
Returns all the public methods of the current <see cref="T:System.Type" /> .
public Type
GetNestedType​(string name)
Inherited from Type
name The string containing the name of the nested type to get.
Returns An object representing the public nested type with the specified name, if found; otherwise, <see langword="null" /> .
Searches for the public nested type with the specified name.
public Type[]
GetNestedTypes​()
Inherited from Type
Returns An array of <see cref="T:System.Type" /> objects representing the public types nested in the current <see cref="T:System.Type" /> (the search is not recursive), or an empty array of type <see cref="T:System.Type" /> if no public types are nested in the current <see cref="T:System.Type" /> .
Returns the public types nested in the current <see cref="T:System.Type" /> .
public Type[]
GetOptionalCustomModifiers​()
Inherited from Type
Returns An array of <see cref="T:System.Type" /> objects that identify the optional custom modifiers of the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Type" /> , if the current <see cref="T:System.Type" /> has no custom modifiers. -or- An empty array of type <see cref="T:System.Type" /> , if the current <see cref="T:System.Type" /> is not a modified <see cref="T:System.Type" /> . A modified <see cref="T:System.Type" /> is obtained from <see cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" /> , <see cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" /> , or <see cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" /> .
When overridden in a derived class, returns the optional custom modifiers of the current <see cref="T:System.Type" /> .
public PropertyInfo[]
GetProperties​()
Inherited from Type
Returns An array of <see cref="T:System.Reflection.PropertyInfo" /> objects representing all public properties of the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Reflection.PropertyInfo" /> , if the current <see cref="T:System.Type" /> does not have public properties.
Returns all the public properties of the current <see cref="T:System.Type" /> .
public PropertyInfo
GetProperty​(string name)
Inherited from Type
name The string containing the name of the public property to get.
Returns An object representing the public property with the specified name, if found; otherwise, <see langword="null" /> .
Searches for the public property with the specified name.
public PropertyInfo
GetProperty​(string name, BindingFlags bindingAttr)
Inherited from Type
name The string containing the name of the property to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
Returns An object representing the property that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified property, using the specified binding constraints.
public PropertyInfo
GetProperty​(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the property to get.
bindingAttr A bitwise combination of the enumeration values that specify how the search is conducted. -or- <see cref="F:System.Reflection.BindingFlags.Default" /> to return <see langword="null" /> .
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> .
returnType The return type of the property.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the indexed property to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a property that is not indexed.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. The default binder does not process this parameter.
Returns An object representing the property that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.
public PropertyInfo
GetProperty​(string name, Type returnType)
Inherited from Type
name The string containing the name of the public property to get.
returnType The return type of the property.
Returns An object representing the public property with the specified name, if found; otherwise, <see langword="null" /> .
Searches for the public property with the specified name and return type.
public PropertyInfo
GetProperty​(string name, Type returnType, Type[] types)
Inherited from Type
name The string containing the name of the public property to get.
returnType The return type of the property.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the indexed property to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a property that is not indexed.
Returns An object representing the public property whose parameters match the specified argument types, if found; otherwise, <see langword="null" /> .
Searches for the specified public property whose parameters match the specified argument types.
public PropertyInfo
GetProperty​(string name, Type returnType, Type[] types, ParameterModifier[] modifiers)
Inherited from Type
name The string containing the name of the public property to get.
returnType The return type of the property.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the indexed property to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a property that is not indexed.
modifiers An array of <see cref="T:System.Reflection.ParameterModifier" /> objects representing the attributes associated with the corresponding element in the <paramref name="types" /> array. The default binder does not process this parameter.
Returns An object representing the public property that matches the specified requirements, if found; otherwise, <see langword="null" /> .
Searches for the specified public property whose parameters match the specified argument types and modifiers.
public PropertyInfo
GetProperty​(string name, Type[] types)
Inherited from Type
name The string containing the name of the public property to get.
types An array of <see cref="T:System.Type" /> objects representing the number, order, and type of the parameters for the indexed property to get. -or- An empty array of the type <see cref="T:System.Type" /> (that is, Type[] types = new Type[0]) to get a property that is not indexed.
Returns An object representing the public property whose parameters match the specified argument types, if found; otherwise, <see langword="null" /> .
Searches for the specified public property whose parameters match the specified argument types.
public Type[]
GetRequiredCustomModifiers​()
Inherited from Type
Returns An array of <see cref="T:System.Type" /> objects that identify the required custom modifiers of the current <see cref="T:System.Type" /> . -or- An empty array of type <see cref="T:System.Type" /> , if the current <see cref="T:System.Type" /> has no custom modifiers. -or- An empty array of type <see cref="T:System.Type" /> , if the current <see cref="T:System.Type" /> is not a modified <see cref="T:System.Type" /> . A modified <see cref="T:System.Type" /> is obtained from <see cref="M:System.Reflection.FieldInfo.GetModifiedFieldType" /> , <see cref="M:System.Reflection.PropertyInfo.GetModifiedPropertyType" /> , or <see cref="M:System.Reflection.ParameterInfo.GetModifiedParameterType" /> .
When overridden in a derived class, returns the required custom modifiers of the current <see cref="T:System.Type" /> .
public Type
GetType​()
Inherited from Type
Returns The current <see cref="T:System.Type" /> .
Gets the current <see cref="T:System.Type" /> .
protected TypeCode
GetTypeCodeImpl​()
Inherited from Type
Returns The type code of the underlying type.
Returns the underlying type code of this <see cref="T:System.Type" /> instance.
public object
InvokeMember​(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args)
Inherited from Type
name The string containing the name of the constructor, method, property, or field member to invoke. -or- An empty string ("") to invoke the default member. -or- For <see langword="IDispatch" /> members, a string representing the DispID, for example "[DispID=3]".
invokeAttr A bitwise combination of the enumeration values that specify how the search is conducted. The access can be one of the <see langword="BindingFlags" /> such as <see langword="Public" /> , <see langword="NonPublic" /> , <see langword="Private" /> , <see langword="InvokeMethod" /> , <see langword="GetField" /> , and so on. The type of lookup need not be specified. If the type of lookup is omitted, <see langword="BindingFlags.Public" /> | <see langword="BindingFlags.Instance" /> | <see langword="BindingFlags.Static" /> are used.
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> . Note that explicitly defining a <see cref="T:System.Reflection.Binder" /> object may be required for successfully invoking method overloads with variable arguments.
target The object on which to invoke the specified member.
args An array containing the arguments to pass to the member to invoke.
Returns An object representing the return value of the invoked member.
Invokes the specified member, using the specified binding constraints and matching the specified argument list.
public object
InvokeMember​(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, Globalization.CultureInfo culture)
Inherited from Type
name The string containing the name of the constructor, method, property, or field member to invoke. -or- An empty string ("") to invoke the default member. -or- For <see langword="IDispatch" /> members, a string representing the DispID, for example "[DispID=3]".
invokeAttr A bitwise combination of the enumeration values that specify how the search is conducted. The access can be one of the <see langword="BindingFlags" /> such as <see langword="Public" /> , <see langword="NonPublic" /> , <see langword="Private" /> , <see langword="InvokeMethod" /> , <see langword="GetField" /> , and so on. The type of lookup need not be specified. If the type of lookup is omitted, <see langword="BindingFlags.Public" /> | <see langword="BindingFlags.Instance" /> | <see langword="BindingFlags.Static" /> are used.
binder An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( <see langword="Nothing" /> in Visual Basic), to use the <see cref="P:System.Type.DefaultBinder" /> . Note that explicitly defining a <see cref="T:System.Reflection.Binder" /> object may be required for successfully invoking method overloads with variable arguments.
target The object on which to invoke the specified member.
args An array containing the arguments to pass to the member to invoke.
culture The object representing the globalization locale to use, which may be necessary for locale-specific conversions, such as converting a numeric <see cref="T:System.String" /> to a <see cref="T:System.Double" /> . -or- A null reference ( <see langword="Nothing" /> in Visual Basic) to use the current thread's <see cref="T:System.Globalization.CultureInfo" /> .
Returns An object representing the return value of the invoked member.
Invokes the specified member, using the specified binding constraints and matching the specified argument list and culture.
public bool
IsAssignableFrom​(Type c)
Inherited from Type
c The type to compare with the current type.
Returns <see langword="true" /> if any of the following conditions is true: - <paramref name="c" /> and the current instance represent the same type. - <paramref name="c" /> is derived either directly or indirectly from the current instance. <paramref name="c" /> is derived directly from the current instance if it inherits from the current instance; <paramref name="c" /> is derived indirectly from the current instance if it inherits from a succession of one or more classes that inherit from the current instance. - The current instance is an interface that <paramref name="c" /> implements. - <paramref name="c" /> is a generic type parameter, and the current instance represents one of the constraints of <paramref name="c" /> . - <paramref name="c" /> represents a value type, and the current instance represents <c>Nullable&lt;c&gt;</c> ( <c>Nullable(Of c)</c> in Visual Basic). <see langword="false" /> if none of these conditions are true, or if <paramref name="c" /> is <see langword="null" /> .
Determines whether an instance of a specified type <paramref name="c" /> can be assigned to a variable of the current type.
public bool
IsAssignableTo​(Type targetType)
Inherited from Type
targetType The type to compare with the current type.
Returns <see langword="true" /> if any of the following conditions is true: - The current instance and <paramref name="targetType" /> represent the same type. - The current type is derived either directly or indirectly from <paramref name="targetType" /> . The current type is derived directly from <paramref name="targetType" /> if it inherits from <paramref name="targetType" /> ; the current type is derived indirectly from <paramref name="targetType" /> if it inherits from a succession of one or more classes that inherit from <paramref name="targetType" /> . - <paramref name="targetType" /> is an interface that the current type implements. - The current type is a generic type parameter, and <paramref name="targetType" /> represents one of the constraints of the current type. - The current type represents a value type, and <paramref name="targetType" /> represents <c>Nullable&lt;c&gt;</c> ( <c>Nullable(Of c)</c> in Visual Basic). <see langword="false" /> if none of these conditions are true, or if <paramref name="targetType" /> is <see langword="null" /> .
Determines whether the current type can be assigned to a variable of the specified <paramref name="targetType" /> .
protected bool
IsContextfulImpl​()
Inherited from Type
Returns <see langword="true" /> if the <see cref="T:System.Type" /> can be hosted in a context; otherwise, <see langword="false" /> .
Implements the <see cref="P:System.Type.IsContextful" /> property and determines whether the <see cref="T:System.Type" /> can be hosted in a context.
public bool
IsEnumDefined​(object value)
Inherited from Type
value The value to be tested.
Returns <see langword="true" /> if the specified value is a member of the current enumeration type; otherwise, <see langword="false" /> .
Returns a value that indicates whether the specified value exists in the current enumeration type.
public bool
IsEquivalentTo​(Type other)
Inherited from Type
other The COM type that is tested for equivalence with the current type.
Returns <see langword="true" /> if the COM types are equivalent; otherwise, <see langword="false" /> . This method also returns <see langword="false" /> if one type is in an assembly that is loaded for execution, and the other is in an assembly that is loaded into the reflection-only context.
Determines whether two COM types have the same identity and are eligible for type equivalence.
public bool
IsInstanceOfType​(object o)
Inherited from Type
o The object to compare with the current type.
Returns <see langword="true" /> if the current <see langword="Type" /> is in the inheritance hierarchy of the object represented by <paramref name="o" /> , or if the current <see langword="Type" /> is an interface that <paramref name="o" /> implements. <see langword="false" /> if neither of these conditions is the case, if <paramref name="o" /> is <see langword="null" /> , or if the current <see langword="Type" /> is an open generic type (that is, <see cref="P:System.Type.ContainsGenericParameters" /> returns <see langword="true" /> ).
Determines whether the specified object is an instance of the current <see cref="T:System.Type" /> .
protected bool
IsMarshalByRefImpl​()
Inherited from Type
Returns <see langword="true" /> if the <see cref="T:System.Type" /> is marshaled by reference; otherwise, <see langword="false" /> .
Implements the <see cref="P:System.Type.IsMarshalByRef" /> property and determines whether the <see cref="T:System.Type" /> is marshaled by reference.
public bool
IsSubclassOf​(Type c)
Inherited from Type
c The type to compare with the current type.
Returns <see langword="true" /> if the current <see langword="Type" /> derives from <paramref name="c" /> ; otherwise, <see langword="false" /> . This method also returns <see langword="false" /> if <paramref name="c" /> and the current <see langword="Type" /> are equal.
Determines whether the current <see cref="T:System.Type" /> derives from the specified <see cref="T:System.Type" /> .
public Type
MakeArrayType​()
Inherited from Type
Returns A <see cref="T:System.Type" /> object representing a one-dimensional array of the current type, with a lower bound of zero.
Returns a <see cref="T:System.Type" /> object representing a one-dimensional array of the current type, with a lower bound of zero.
public Type
MakeArrayType​(int rank)
Inherited from Type
rank The number of dimensions for the array. This number must be less than or equal to 32.
Returns An object representing an array of the current type, with the specified number of dimensions.
Returns a <see cref="T:System.Type" /> object representing an array of the current type, with the specified number of dimensions.
public Type
MakeByRefType​()
Inherited from Type
Returns A <see cref="T:System.Type" /> object that represents the current type when passed as a <see langword="ref" /> parameter ( <see langword="ByRef" /> parameter in Visual Basic).
Returns a <see cref="T:System.Type" /> object that represents the current type when passed as a <see langword="ref" /> parameter ( <see langword="ByRef" /> parameter in Visual Basic).
public Type
MakeGenericType​(Type[] typeArguments)
Inherited from Type
typeArguments An array of types to be substituted for the type parameters of the current generic type.
Returns A <see cref="T:System.Type" /> representing the constructed type formed by substituting the elements of <paramref name="typeArguments" /> for the type parameters of the current generic type.
Substitutes the elements of an array of types for the type parameters of the current generic type definition and returns a <see cref="T:System.Type" /> object representing the resulting constructed type.
public Type
MakePointerType​()
Inherited from Type
Returns A <see cref="T:System.Type" /> object that represents a pointer to the current type.
Returns a <see cref="T:System.Type" /> object that represents a pointer to the current type.
public string
ToString​()
Inherited from Type
Returns A <see cref="T:System.String" /> representing the name of the current <see cref="T:System.Type" /> .
Returns a <see langword="String" /> representing the name of the current <see langword="Type" /> .
GetCustomAttributesData​()
Inherited from MemberInfo
Returns A generic list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the target member.
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the target member.
public bool
HasSameMetadataDefinitionAs​(MemberInfo other)
Inherited from MemberInfo
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .