_ConstructorInfo.Invoke_4(BindingFlags, Binder, Object[], CultureInfo) _ConstructorInfo.Invoke_4(BindingFlags, Binder, Object[], CultureInfo) _ConstructorInfo.Invoke_4(BindingFlags, Binder, Object[], CultureInfo) Method

定义

为 COM 对象提供对 Invoke(BindingFlags, Binder, Object[], CultureInfo) 方法的版本无关的访问。Provides COM objects with version-independent access to the Invoke(BindingFlags, Binder, Object[], CultureInfo) method.

public:
 System::Object ^ Invoke_4(System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, cli::array <System::Object ^> ^ parameters, System::Globalization::CultureInfo ^ culture);
public object Invoke_4 (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture);
abstract member Invoke_4 : System.Reflection.BindingFlags * System.Reflection.Binder * obj[] * System.Globalization.CultureInfo -> obj

参数

invokeAttr
BindingFlags BindingFlags BindingFlags

指定绑定类型的 BindingFlags 值之一。One of the BindingFlags values that specifies the type of binding.

binder
Binder Binder Binder

一个 Binder,它定义一组属性并通过反射来启用绑定、自变量类型强制转换和成员调用。A Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. 如果 bindernull,则使用 Binder.DefaultBindingIf binder is null, then Binder.DefaultBinding is used.

parameters
Object[]

Object 类型的数组,该类型用于在 binder 的约束下匹配此构造函数的参数的个数、顺序和类型。An array of type Object used to match the number, order, and type of the parameters for this constructor, under the constraints of binder. 如果此构造函数不需要参数,则像 Object[] parameters = new Object[0] 中那样传递一个包含零元素的数组。If this constructor does not require parameters, pass an array with zero elements, as in Object[] parameters = new Object[0]. 此数组中未使用值显式初始化的任何对象都将包含该对象类型的默认值。Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. 对于引用类型元素,此值为 nullFor reference-type elements, this value is null. 对于值类型元素,此值为 0、0.0 或 false,具体取决于特定的元素类型。For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.

culture
CultureInfo CultureInfo CultureInfo

用于控制类型强制转换的 CultureInfoA CultureInfo used to govern the coercion of types. 如果这是 null,则使用当前线程的 CultureInfoIf this is null, the CultureInfo for the current thread is used.

返回

与构造函数关联的类的实例。An instance of the class associated with the constructor.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Invoke方法将调用此反映的构造函数ConstructorInfo对象使用指定参数,指定的约束下Binder对象。The Invoke method invokes the constructor reflected by this ConstructorInfo object with the specified arguments, under the constraints of the specified Binder object.

适用于