AccessibleObject.IReflect.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) AccessibleObject.IReflect.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) Method


 virtual System::Object ^ System.Reflection.IReflect.InvokeMember(System::String ^ name, System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, System::Object ^ target, cli::array <System::Object ^> ^ args, cli::array <System::Reflection::ParameterModifier> ^ modifiers, System::Globalization::CultureInfo ^ culture, cli::array <System::String ^> ^ namedParameters) = System::Reflection::IReflect::InvokeMember;
object IReflect.InvokeMember (string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters);


String String

The name of the member to find.

BindingFlags BindingFlags

One of the BindingFlags invocation attributes.

Binder Binder

One of the BindingFlags bit flags. Implements Binder, containing properties related to this method.

Object Object

The object on which to invoke the specified member. This parameter is ignored for static members.


An 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.


An array of ParameterModifier objects.

CultureInfo CultureInfo

An instance of CultureInfo used to govern the coercion of types.


A String array of parameters.


The specified member.



invokeAttr is CreateInstance and another bit flag is also set.

-or- invokeAttr is not CreateInstance and name is null.


invokeAttr is not an invocation attribute from BindingFlags.


invokeAttr specifies both get and set for a property or field.


invokeAttr specifies both a field set and an Invoke method.args is provided for a field get operation.


More than one argument is specified for a field set operation.

The field or property cannot be found.

The method cannot be found.

A private member is invoked without the necessary ReflectionPermission.


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.

The modifiers parameter 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.

This member is an explicit interface member implementation. It can be used only when the AccessibleObject instance is cast to an IReflect interface.

Applies to