Interface ITypeIntrospectionProvider
Interface representing a reflection provider used to introspect System.Type objects.
Inherited Members
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public interface ITypeIntrospectionProvider : IMemberInfoIntrospectionProvider, IReflectionTypeSystemProvider
Methods
ContainsGenericParameters(Type)
Gets a value indicating whether the specified type
object has type parameters that have not been replaced by specific types.
Declaration
bool ContainsGenericParameters(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check for generic parameters. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
FindInterfaces(Type, TypeFilter, Object)
Returns an array of System.Type objects representing a filtered list of interfaces implemented or inherited by the specified type
.
Declaration
IReadOnlyList<Type> FindInterfaces(Type type, TypeFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to find interfaces for. |
System.Reflection.TypeFilter | filter | The delegate that compares the interfaces against |
System.Object | filterCriteria | The search criteria that determines whether an interface should be included in the returned array. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing a filtered list of the interfaces implemented or inherited by the specified |
FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object)
Returns a filtered array of System.Reflection.MemberInfo objects of the specified member type.
Declaration
IReadOnlyList<MemberInfo> FindMembers(Type type, MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to find members in. |
System.Reflection.MemberTypes | memberType | An object that indicates the type of member to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero, to return null. |
System.Reflection.MemberFilter | filter | The delegate that does the comparisons, returning true if the member currently being inspected matches the |
System.Object | filterCriteria | The search criteria that determines whether a member is returned in the array of MemberInfo objects.The fields of FieldAttributes, MethodAttributes, and MethodImplAttributes can be used in conjunction with the FilterAttribute delegate supplied by this class. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | A filtered array of System.Reflection.MemberInfo objects of the specified member type.-or- An empty array of type System.Reflection.MemberInfo, if the specified |
GetArrayRank(Type)
Gets the number of dimensions in an System.Array.
Declaration
int GetArrayRank(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the rank for. |
Returns
Type | Description |
---|---|
System.Int32 | An System.Int32 containing the number of dimensions in the specified |
GetAssembly(Type)
Gets the System.Reflection.Assembly in which the specified type
is declared. For generic types, gets the System.Reflection.Assembly in which the generic type is defined.
Declaration
Assembly GetAssembly(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the declaring assembly for. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | An System.Reflection.Assembly instance that describes the assembly containing the specified |
GetAssemblyQualifiedName(Type)
Gets the assembly-qualified name of the specified type
, which includes the name of the assembly from which the specified type
was loaded.
Declaration
string GetAssemblyQualifiedName(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the assembly-qualified name for. |
Returns
Type | Description |
---|---|
System.String | The assembly-qualified name of the specified |
GetAttributes(Type)
Gets the attributes associated with the specified type
.
Declaration
TypeAttributes GetAttributes(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.TypeAttributes | A System.Reflection.TypeAttributes object representing the attribute set of the specified |
GetBaseType(Type)
Gets the type from which the specified type
directly inherits.
Declaration
Type GetBaseType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the base type for. |
Returns
Type | Description |
---|---|
System.Type | The System.Type from which the specified |
GetConstructor(Type, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
ConstructorInfo GetConstructor(Type type, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the constructor for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | 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, to use the System.Type.DefaultBinder. |
System.Reflection.CallingConventions | 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. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the constructor to get.-or- An empty array of the type System.Type to get a constructor that takes no parameters. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.ConstructorInfo | An object representing the constructor that matches the specified requirements, if found; otherwise, null. |
GetConstructors(Type, BindingFlags)
Searches for the constructors defined for the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<ConstructorInfo> GetConstructors(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the constructors for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.ConstructorInfo> | An array of System.Reflection.ConstructorInfo objects representing all constructors defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.ConstructorInfo, if no constructors are defined for the specified type, or if none of the defined constructors match the binding constraints. |
GetDeclaringMethod(Type)
Gets a System.Reflection.MethodBase that represents the declaring method, if the specified type
represents a type parameter of a generic method.
Declaration
MethodBase GetDeclaringMethod(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the declaring method for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodBase | If the specified |
GetDeclaringType(Type)
Gets the type that declares the current nested type or generic type parameter.
Declaration
Type GetDeclaringType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the declaring type for. |
Returns
Type | Description |
---|---|
System.Type | A System.Type object representing the enclosing type, if the specified |
GetDefaultMembers(Type)
Searches for the members defined for the specified type
whose System.Reflection.DefaultMemberAttribute is set.
Declaration
IReadOnlyList<MemberInfo> GetDefaultMembers(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the default members for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing all default members of the specified |
GetElementType(Type)
Gets the element type of an array, by-ref, or pointer type.
Declaration
Type GetElementType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the element type for. |
Returns
Type | Description |
---|---|
System.Type | The element type of the specified type. |
GetEvent(Type, String, BindingFlags)
Searches for an event with the specified name, using the specified binding constraints.
Declaration
EventInfo GetEvent(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the event for. |
System.String | name | The name of the event to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.EventInfo | An object representing the event that matches the specified requirements, if found; otherwise, null. |
GetEvents(Type, BindingFlags)
Searches for events that are declared or inherited by the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<EventInfo> GetEvents(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the events for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.EventInfo> | An array of System.Reflection.EventInfo objects representing all events defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.EventInfo, if no events are defined for the specified type, or if none of the defined events match the binding constraints. |
GetField(Type, String, BindingFlags)
Searches for a field with the specified name, using the specified binding constraints.
Declaration
FieldInfo GetField(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the field for. |
System.String | name | The name of the field to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.FieldInfo | An object representing the field that matches the specified requirements, if found; otherwise, null. |
GetFields(Type, BindingFlags)
Searches for fields defined for the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<FieldInfo> GetFields(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the fields for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.FieldInfo> | An array of System.Reflection.FieldInfo objects representing all fields defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.FieldInfo, if no fields are defined for the specified type, or if none of the defined fields match the binding constraints. |
GetFullName(Type)
Gets the fully qualified name of the specified type
, including the namespace of the System.Type but not the assembly.
Declaration
string GetFullName(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the full name for. |
Returns
Type | Description |
---|---|
System.String | The fully qualified name of the specified |
GetGenericArguments(Type)
Returns an array of System.Type objects that represent the type arguments of a closed generic type or the type parameters of a generic type definition.
Declaration
IReadOnlyList<Type> GetGenericArguments(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic arguments for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the type arguments of a generic type. Returns an empty array if the specified type is not a generic type. |
GetGenericParameterAttributes(Type)
Gets a combination of System.Reflection.GenericParameterAttributes flags that describe the covariance and special constraints of the specified generic type parameter.
Declaration
GenericParameterAttributes GetGenericParameterAttributes(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic parameter attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.GenericParameterAttributes | A bitwise combination of System.Reflection.GenericParameterAttributes values that describes the covariance and special constraints of the specified generic type parameter. |
GetGenericParameterConstraints(Type)
Returns an array of System.Type objects that represent the constraints on the generic type parameter.
Declaration
IReadOnlyList<Type> GetGenericParameterConstraints(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The generic parameter type to get the constraints for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the constraints on the specified generic type parameter. |
GetGenericParameterPosition(Type)
Gets the position of the type parameter in the type parameter list of the generic type or method that declared the parameter, when the specified type
represents a type parameter of a generic type or a generic method.
Declaration
int GetGenericParameterPosition(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic parameter position for. |
Returns
Type | Description |
---|---|
System.Int32 | The position of a type parameter in the type parameter list of the generic type or method that defines the parameter. Position numbers begin at 0. |
GetGenericTypeDefinition(Type)
Gets the generic type definition of the specified generic type.
Declaration
Type GetGenericTypeDefinition(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic type definition for. |
Returns
Type | Description |
---|---|
System.Type | The generic type definition of the specified type. |
GetGuid(Type)
Gets the GUID associated with the specified type
.
Declaration
Guid GetGuid(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the associated GUID for. |
Returns
Type | Description |
---|---|
System.Guid | The GUID associated with the specified |
GetInterface(Type, String, Boolean)
Searches for the specified interface, specifying whether to do a case-insensitive search for the interface name.
Declaration
Type GetInterface(Type type, string name, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interface for. |
System.String | name | The string containing the name of the interface to get. For generic interfaces, this is the mangled name. |
System.Boolean | ignoreCase | true to ignore the case of that part of |
Returns
Type | Description |
---|---|
System.Type | An object representing the interface with the specified name, implemented or inherited by the specified type, if found; otherwise, null. |
GetInterfaceMap(Type, Type)
Returns an interface mapping for the specified interface type.
Declaration
InterfaceMapping GetInterfaceMap(Type type, Type interfaceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interface mapping for. |
System.Type | interfaceType | The interface type to retrieve a mapping for. |
Returns
Type | Description |
---|---|
System.Reflection.InterfaceMapping | An object that represents the interface mapping for |
GetInterfaces(Type)
Gets all the interfaces implemented or inherited by the specified type.
Declaration
IReadOnlyList<Type> GetInterfaces(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interfaces for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing all the interfaces implemented or inherited by the specified type.-or- An empty array of type System.Type, if no interfaces are implemented or inherited by the specified type. |
GetMember(Type, String, MemberTypes, BindingFlags)
Searches for the specified members of the specified member type, using the specified binding constraints.
Declaration
IReadOnlyList<MemberInfo> GetMember(Type type, string name, MemberTypes memberTypes, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the members for. |
System.String | name | The string containing the name of the members to get. |
System.Reflection.MemberTypes | memberTypes | The types of members to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing the members with the specified name, if found; otherwise, an empty array. |
GetMembers(Type, BindingFlags)
Searches for members defined for the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<MemberInfo> GetMembers(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the members for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing all members defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.MemberInfo, if no members are defined for the specified type, or if none of the defined members match the binding constraints. |
GetMethod(Type, String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
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.
Declaration
MethodInfo GetMethod(Type type, string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the method for. |
System.String | name | The string containing the name of the method to get. |
System.Int32 | genericParameterCount | The number of generic type parameters of the method. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | 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, to use the System.Type.DefaultBinder. |
System.Reflection.CallingConventions | 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. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the method to get.-or- An empty array of the type System.Type to get a method that takes no parameters. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
GetMethod(Type, String, BindingFlags)
Searches for the specified method, using the specified binding constraints.
Declaration
MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the method for. |
System.String | name | The string containing the name of the method to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
GetMethod(Type, String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the method for. |
System.String | name | The string containing the name of the method to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | 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, to use the System.Type.DefaultBinder. |
System.Reflection.CallingConventions | 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. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the method to get.-or- An empty array of the type System.Type to get a method that takes no parameters. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
GetMethods(Type, BindingFlags)
Searches for methods defined for the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<MethodInfo> GetMethods(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the methods for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of System.Reflection.MethodInfo objects representing all methods defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.MethodInfo, if no methods are defined for the specified type, or if none of the defined methods match the binding constraints. |
GetModule(Type)
Gets the module in which the specified type
is defined.
Declaration
Module GetModule(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the module for. |
Returns
Type | Description |
---|---|
System.Reflection.Module | The module in which the specified |
GetNamespace(Type)
Gets the namespace of the specified type
.
Declaration
string GetNamespace(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the namespace for. |
Returns
Type | Description |
---|---|
System.String | The namespace of the specified |
GetNestedType(Type, String, BindingFlags)
Searches for a nested type with the specified name, using the specified binding constraints.
Declaration
Type GetNestedType(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the nested type for. |
System.String | name | The name of the nested type to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Type | An object representing the nested type that matches the specified requirements, if found; otherwise, null. |
GetNestedTypes(Type, BindingFlags)
Searches for types nested in the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<Type> GetNestedTypes(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the nested types for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing all nested types defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Type, if no nested types are defined for the specified type, or if none of the nested types methods match the binding constraints. |
GetProperties(Type, BindingFlags)
Searches for properties of for the specified type, using the specified binding constraints.
Declaration
IReadOnlyList<PropertyInfo> GetProperties(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the properties for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.PropertyInfo> | An array of System.Reflection.PropertyInfo objects representing all properties defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.PropertyInfo, if no properties are defined for the specified type, or if none of the defined properties match the binding constraints. |
GetProperty(Type, String, BindingFlags)
Searches for the specified property, using the specified binding constraints.
Declaration
PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the property for. |
System.String | name | The string containing the name of the property to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
GetProperty(Type, String, BindingFlags, Binder, Type, Type[], ParameterModifier[])
Searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.
Declaration
PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the property for. |
System.String | name | The string containing the name of the property to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | 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, to use the System.Type.DefaultBinder. |
System.Type | returnType | The return type of the property. |
System.Type[] | types | An array of 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 System.Type to get a property that is not indexed. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
GetProperty(Type, String, Type)
Searches for the specified public property with the specified name and return type.
Declaration
PropertyInfo GetProperty(Type type, string name, Type returnType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the property for. |
System.String | name | The string containing the name of the property to get. |
System.Type | returnType | The return type of the property. |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
GetStructLayoutAttribute(Type)
Gets a System.Runtime.InteropServices.StructLayoutAttribute that describes the layout of the specified type
.
Declaration
StructLayoutAttribute GetStructLayoutAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the struct layout attribute for. |
Returns
Type | Description |
---|---|
System.Runtime.InteropServices.StructLayoutAttribute | A System.Runtime.InteropServices.StructLayoutAttribute that describes the gross layout features of the specified |
GetTypeHandle(Type)
Gets the handle for the specified type
.
Declaration
RuntimeTypeHandle GetTypeHandle(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the runtime handle for. |
Returns
Type | Description |
---|---|
System.RuntimeTypeHandle | The handle for the specified |
GetUnderlyingSystemType(Type)
Indicates the type provided by the common language runtime that represents the specified type
.
Declaration
Type GetUnderlyingSystemType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the underlying type for. |
Returns
Type | Description |
---|---|
System.Type | The underlying system type for the specified |
HasElementType(Type)
Gets a value indicating whether the specified type
encompasses or refers to another type; that is, whether the specified type
is an array, a pointer, or is passed by reference.
Declaration
bool HasElementType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsArray(Type)
Gets a value indicating whether the specified type
is an array.
Declaration
bool IsArray(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsByRef(Type)
Gets a value indicating whether the specified type
is passed by reference.
Declaration
bool IsByRef(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsCOMObject(Type)
Gets a value indicating whether the specified type
is a COM object.
Declaration
bool IsCOMObject(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsConstructedGenericType(Type)
Gets a value indicating whether the specified type
is a constructed generic type.
Declaration
bool IsConstructedGenericType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsContextful(Type)
Gets a value indicating whether the specified type
can be hosted in a context.
Declaration
bool IsContextful(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsGenericParameter(Type)
Gets a value indicating whether the specified type
represents a type parameter in the definition of a generic type or method.
Declaration
bool IsGenericParameter(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsGenericType(Type)
Gets a value indicating whether the specified type
is a generic type.
Declaration
bool IsGenericType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsGenericTypeDefinition(Type)
Gets a value indicating whether the specified type
represents a generic type definition, from which other generic types can be constructed.
Declaration
bool IsGenericTypeDefinition(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsInterface(Type)
Gets a value indicating whether the specified type
is an interface type.
Declaration
bool IsInterface(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsMarshalByRef(Type)
Gets a value indicating whether the specified type
is marshaled by reference.
Declaration
bool IsMarshalByRef(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsPointer(Type)
Gets a value indicating whether the specified type
is a pointer.
Declaration
bool IsPointer(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsPrimitive(Type)
Gets a value indicating whether the specified type
is one of the primitive types.
Declaration
bool IsPrimitive(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsSecurityCritical(Type)
Gets a value that indicates whether the specified type
is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.
Declaration
bool IsSecurityCritical(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsSecuritySafeCritical(Type)
Gets a value that indicates whether the specified 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.
Declaration
bool IsSecuritySafeCritical(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsSecurityTransparent(Type)
Gets a value that indicates whether the specified type
is transparent at the current trust level, and therefore cannot perform critical operations.
Declaration
bool IsSecurityTransparent(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsSerializable(Type)
Gets a value indicating whether the System.Type is serializable.
Declaration
bool IsSerializable(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsValueType(Type)
Gets a value indicating whether the specified type
is a value type.
Declaration
bool IsValueType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
IsVisible(Type)
Gets a value indicating whether the specified type
can be accessed by code outside the assembly.
Declaration
bool IsVisible(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |