mscorlib(4.0.0.0) API with additions
System.Reflection.IReflect Interface Reference

Interoperates with the IDispatch interface. More...

Inheritance diagram for System.Reflection.IReflect:
[legend]

Public Member Functions

MethodInfo GetMethod (string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
 Retrieves a T:System.Reflection.MethodInfo object corresponding to a specified method, using a T:System.Type array to choose from among overloaded methods. More...
 
MethodInfo GetMethod (string name, BindingFlags bindingAttr)
 Retrieves a T:System.Reflection.MethodInfo object that corresponds to a specified method under specified search constraints. More...
 
MethodInfo [] GetMethods (BindingFlags bindingAttr)
 Retrieves an array of T:System.Reflection.MethodInfo objects with all public methods or all methods of the current class. More...
 
FieldInfo GetField (string name, BindingFlags bindingAttr)
 Returns the T:System.Reflection.FieldInfo object that corresponds to the specified field and binding flag. More...
 
FieldInfo [] GetFields (BindingFlags bindingAttr)
 Returns an array of T:System.Reflection.FieldInfo objects that correspond to all fields of the current class. More...
 
PropertyInfo GetProperty (string name, BindingFlags bindingAttr)
 Retrieves a T:System.Reflection.PropertyInfo object corresponding to a specified property under specified search constraints. More...
 
PropertyInfo GetProperty (string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
 Retrieves a T:System.Reflection.PropertyInfo object that corresponds to a specified property with specified search constraints. More...
 
PropertyInfo [] GetProperties (BindingFlags bindingAttr)
 Retrieves an array of T:System.Reflection.PropertyInfo objects corresponding to all public properties or to all properties of the current class. More...
 
MemberInfo [] GetMember (string name, BindingFlags bindingAttr)
 Retrieves an array of T:System.Reflection.MemberInfo objects corresponding to all public members or to all members that match a specified name. More...
 
MemberInfo [] GetMembers (BindingFlags bindingAttr)
 Retrieves an array of T:System.Reflection.MemberInfo objects that correspond either to all public members or to all members of the current class. More...
 
object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
 Invokes a specified member. More...
 

Properties

Type UnderlyingSystemType [get]
 Gets the underlying type that represents the T:System.Reflection.IReflect object. More...
 

Detailed Description

Interoperates with the IDispatch interface.

Definition at line 9 of file IReflect.cs.

Member Function Documentation

◆ GetField()

FieldInfo System.Reflection.IReflect.GetField ( string  name,
BindingFlags  bindingAttr 
)

Returns the T:System.Reflection.FieldInfo object that corresponds to the specified field and binding flag.

Parameters
nameThe name of the field to find.
bindingAttrThe binding attributes used to control the search.
Returns
A T:System.Reflection.FieldInfo object containing the field information for the named object that meets the search constraints specified in bindingAttr .
Exceptions
T:System.Reflection.AmbiguousMatchExceptionThe object implements multiple fields with the same name.

Implemented in System.Type, System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.GenericTypeParameterBuilder, System.Reflection.Emit.EnumBuilder, and System.Reflection.TypeDelegator.

◆ GetFields()

FieldInfo [] System.Reflection.IReflect.GetFields ( BindingFlags  bindingAttr)

Returns an array of T:System.Reflection.FieldInfo objects that correspond to all fields of the current class.

Parameters
bindingAttrThe binding attributes used to control the search.
Returns
An array of T:System.Reflection.FieldInfo objects containing all the field information for this reflection object that meets the search constraints specified in bindingAttr .

Implemented in System.Type, System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.GenericTypeParameterBuilder, System.Reflection.Emit.EnumBuilder, and System.Reflection.TypeDelegator.

◆ GetMember()

MemberInfo [] System.Reflection.IReflect.GetMember ( string  name,
BindingFlags  bindingAttr 
)

Retrieves an array of T:System.Reflection.MemberInfo objects corresponding to all public members or to all members that match a specified name.

Parameters
nameThe name of the member to find.
bindingAttrThe binding attributes used to control the search.
Returns
An array of T:System.Reflection.MemberInfo objects matching the name parameter.

Implemented in System.Type.

◆ GetMembers()

MemberInfo [] System.Reflection.IReflect.GetMembers ( BindingFlags  bindingAttr)

Retrieves an array of T:System.Reflection.MemberInfo objects that correspond either to all public members or to all members of the current class.

Parameters
bindingAttrThe binding attributes used to control the search.
Returns
An array of T:System.Reflection.MemberInfo objects containing all the member information for this reflection object.

Implemented in System.Type, System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.GenericTypeParameterBuilder, System.Reflection.Emit.EnumBuilder, and System.Reflection.TypeDelegator.

◆ GetMethod() [1/2]

MethodInfo System.Reflection.IReflect.GetMethod ( string  name,
BindingFlags  bindingAttr,
Binder  binder,
Type []  types,
ParameterModifier []  modifiers 
)

Retrieves a T:System.Reflection.MethodInfo object corresponding to a specified method, using a T:System.Type array to choose from among overloaded methods.

Parameters
nameThe name of the member to find.
bindingAttrThe binding attributes used to control the search.
binderAn object that implements T:System.Reflection.Binder, containing properties related to this method.
typesAn array used to choose among overloaded methods.
modifiersAn array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.
Returns
The requested method that matches all the specified parameters.
Exceptions
T:System.Reflection.AmbiguousMatchExceptionThe object implements multiple methods with the same name.

Implemented in System.Type.

◆ GetMethod() [2/2]

MethodInfo System.Reflection.IReflect.GetMethod ( string  name,
BindingFlags  bindingAttr 
)

Retrieves a T:System.Reflection.MethodInfo object that corresponds to a specified method under specified search constraints.

Parameters
nameThe name of the member to find.
bindingAttrThe binding attributes used to control the search.
Returns
A T:System.Reflection.MethodInfo object containing the method information, with the match being based on the method name and search constraints specified in bindingAttr .
Exceptions
T:System.Reflection.AmbiguousMatchExceptionThe object implements multiple methods with the same name.

Implemented in System.Type.

◆ GetMethods()

MethodInfo [] System.Reflection.IReflect.GetMethods ( BindingFlags  bindingAttr)

Retrieves an array of T:System.Reflection.MethodInfo objects with all public methods or all methods of the current class.

Parameters
bindingAttrThe binding attributes used to control the search.
Returns
An array of T:System.Reflection.MethodInfo objects containing all the methods defined for this reflection object that meet the search constraints specified in bindingAttr .

Implemented in System.Type, System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.GenericTypeParameterBuilder, System.Reflection.Emit.EnumBuilder, and System.Reflection.TypeDelegator.

◆ GetProperties()

PropertyInfo [] System.Reflection.IReflect.GetProperties ( BindingFlags  bindingAttr)

Retrieves an array of T:System.Reflection.PropertyInfo objects corresponding to all public properties or to all properties of the current class.

Parameters
bindingAttrThe binding attribute used to control the search.
Returns
An array of T:System.Reflection.PropertyInfo objects for all the properties defined on the reflection object.

Implemented in System.Type, System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.GenericTypeParameterBuilder, System.Reflection.Emit.EnumBuilder, and System.Reflection.TypeDelegator.

◆ GetProperty() [1/2]

PropertyInfo System.Reflection.IReflect.GetProperty ( string  name,
BindingFlags  bindingAttr 
)

Retrieves a T:System.Reflection.PropertyInfo object corresponding to a specified property under specified search constraints.

Parameters
nameThe name of the property to find.
bindingAttrThe binding attributes used to control the search.
Returns
A T:System.Reflection.PropertyInfo object for the located property that meets the search constraints specified in bindingAttr , or null if the property was not located.
Exceptions
T:System.Reflection.AmbiguousMatchExceptionThe object implements multiple fields with the same name.

Implemented in System.Type.

◆ GetProperty() [2/2]

PropertyInfo System.Reflection.IReflect.GetProperty ( string  name,
BindingFlags  bindingAttr,
Binder  binder,
Type  returnType,
Type []  types,
ParameterModifier []  modifiers 
)

Retrieves a T:System.Reflection.PropertyInfo object that corresponds to a specified property with specified search constraints.

Parameters
nameThe name of the member to find.
bindingAttrThe binding attribute used to control the search.
binderAn object that implements T:System.Reflection.Binder, containing properties related to this method.
returnTypeThe type of the property.
typesAn array used to choose among overloaded methods with the same name.
modifiersAn array used to choose the parameter modifiers.
Returns
A T:System.Reflection.PropertyInfo object for the located property, if a property with the specified name was located in this reflection object, or null if the property was not located.

Implemented in System.Type.

◆ InvokeMember()

object System.Reflection.IReflect.InvokeMember ( string  name,
BindingFlags  invokeAttr,
Binder  binder,
object  target,
object []  args,
ParameterModifier []  modifiers,
CultureInfo  culture,
string []  namedParameters 
)

Invokes a specified member.

Parameters
nameThe name of the member to find.
invokeAttrOne of the T:System.Reflection.BindingFlags invocation attributes. The invokeAttr parameter may be a constructor, method, property, or field. A suitable invocation attribute must be specified. Invoke the default member of a class by passing the empty string ("") as the name of the member.
binderOne of the T:System.Reflection.BindingFlags bit flags. Implements T:System.Reflection.Binder, containing properties related to this method.
targetThe object on which to invoke the specified member. This parameter is ignored for static members.
argsAn array of objects that contains the number, order, and type of the parameters of the member to be invoked. This is an empty array if there are no parameters.
modifiersAn array of T:System.Reflection.ParameterModifier objects. This array has the same length as the args parameter, representing the invoked member's argument attributes in the metadata. A parameter can have the following attributes: pdIn, pdOut, pdRetval, pdOptional, and pdHasDefault. These represent [In], [Out], [retval], [optional], and a default parameter, respectively. These attributes are used by various interoperability services.
cultureAn instance of T:System.Globalization.CultureInfo used to govern the coercion of types. For example, culture converts a String that represents 1000 to a Double value, since 1000 is represented differently by different cultures. If this parameter is null, the T:System.Globalization.CultureInfo for the current thread is used.
namedParametersA String array of parameters.
Returns
The specified member.
Exceptions
T:System.ArgumentExceptioninvokeAttr is F:System.Reflection.BindingFlags.CreateInstance and another bit flag is also set.
T:System.ArgumentExceptioninvokeAttr is not F:System.Reflection.BindingFlags.CreateInstance and name is null.
T:System.ArgumentExceptioninvokeAttr is not an invocation attribute from T:System.Reflection.BindingFlags.
T:System.ArgumentExceptioninvokeAttr specifies both get and set for a property or field.
T:System.ArgumentExceptioninvokeAttr specifies both a field set and an Invoke method. args are provided for a field get.
T:System.ArgumentExceptionMore than one argument is specified for a field set.
T:System.MissingFieldExceptionThe field or property cannot be found.
T:System.MissingMethodExceptionThe method cannot be found.
T:System.Security.SecurityExceptionA private member is invoked without the necessary T:System.Security.Permissions.ReflectionPermission.

Implemented in System.Type, System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.GenericTypeParameterBuilder, System.Reflection.Emit.EnumBuilder, and System.Reflection.TypeDelegator.

Property Documentation

◆ UnderlyingSystemType

Type System.Reflection.IReflect.UnderlyingSystemType
get

Gets the underlying type that represents the T:System.Reflection.IReflect object.

Returns
The underlying type that represents the T:System.Reflection.IReflect object.

Definition at line 14 of file IReflect.cs.


The documentation for this interface was generated from the following file: