ConstructorInfoWrapper.Invoke Method (Object, BindingFlags, Binder, array<Object , CultureInfo)
Invokes the constructor with the specified parameters.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Public Overrides Function Invoke ( _
obj As Object, _
invokeAttr As BindingFlags, _
binder As Binder, _
parameters As Object(), _
culture As CultureInfo _
) As Object
public override Object Invoke(
Object obj,
BindingFlags invokeAttr,
Binder binder,
Object[] parameters,
CultureInfo culture
)
public:
virtual Object^ Invoke(
Object^ obj,
BindingFlags invokeAttr,
Binder^ binder,
array<Object^>^ parameters,
CultureInfo^ culture
) override
abstract Invoke :
obj:Object *
invokeAttr:BindingFlags *
binder:Binder *
parameters:Object[] *
culture:CultureInfo -> Object
override Invoke :
obj:Object *
invokeAttr:BindingFlags *
binder:Binder *
parameters:Object[] *
culture:CultureInfo -> Object
public override function Invoke(
obj : Object,
invokeAttr : BindingFlags,
binder : Binder,
parameters : Object[],
culture : CultureInfo
) : Object
Parameters
obj
Type: ObjectThe object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor.
invokeAttr
Type: BindingFlagsA bitmask that is a combination of 0 or more bit flags from BindingFlags. If binder is null, this parameter is assigned the value Default; thus, whatever you pass in is ignored.
binder
Type: BinderAn object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If binder is null, the default binder is used.
parameters
Type: array<Object[]An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be nulla null reference (Nothing in Visual Basic).
culture
Type: CultureInfoAn instance of CultureInfo used to govern the coercion of types. If this is nulla null reference (Nothing in Visual Basic), the CultureInfo for the current thread is used.
Return Value
Type: Object
An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.
Implements
_MethodBase.Invoke(Object, BindingFlags, Binder, Object, CultureInfo)
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.