System.Runtime.InteropServices._MethodBase.Invoke Method

Provides COM objects with version-independent access to the System.Reflection.MethodBase.Invoke(object, System.Reflection.BindingFlags, System.Reflection.Binder, Object[], System.Globalization.CultureInfo) method.

Syntax

public object Invoke (object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture)

Parameters

obj
The instance that created this method.
invokeAttr
One of the BindingFlags values that specifies the type of binding.
binder
A Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. If binder is null, then Binder.DefaultBinding is used.
parameters
An array of type Object used to match the number, order, and type of the parameters for this constructor, under the constraints of binder. 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. For reference type elements, this value is null. For value type elements, this value is 0, 0.0, or false, depending on the specific element type.
culture
A System.Globalization.CultureInfo object used to govern the coercion of types. If this is null, the System.Globalization.CultureInfo for the current thread is used.

Returns

An instance of the class associated with the constructor.

Remarks

This method is for access to managed classes from unmanaged code and should not be called from managed code.

The System.Reflection.MethodBase.Invoke(object, System.Reflection.BindingFlags, System.Reflection.Binder, Object[], System.Globalization.CultureInfo) method invokes the constructor reflected by this System.Reflection.ConstructorInfo object with the specified arguments, under the constraints of the specified System.Reflection.Binder object.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0