Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

_MethodBase.Invoke Method (Object, BindingFlags, Binder, Object[], CultureInfo)

Provides COM objects with version-independent access to the Invoke method.

Namespace:  System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

Object Invoke(
	Object obj,
	BindingFlags invokeAttr,
	Binder binder,
	Object[] parameters,
	CultureInfo culture
)

Parameters

obj
Type: System.Object
The instance that created this method.
invokeAttr
Type: System.Reflection.BindingFlags
One of the BindingFlags values that specifies the type of binding.
binder
Type: System.Reflection.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
Type: System.Object[]
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
Type: System.Globalization.CultureInfo
A CultureInfo object used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used.

Return Value

Type: System.Object
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.

The Invoke method invokes the constructor reflected by this ConstructorInfo object with the specified arguments, under the constraints of the specified Binder object.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft