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)

Note: This method is new in the .NET Framework version 2.0.

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

This method is not CLS-compliant.  

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

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

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 a null reference (Nothing in Visual Basic), 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 a null reference (Nothing in Visual Basic). For value type elements, this value is 0, 0.0, or false, depending on the specific element type.

culture

A CultureInfo object used to govern the coercion of types. If this is a null reference (Nothing in Visual Basic), the CultureInfo for the current thread is used.

Return Value

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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft