NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ConstructorInfo.Invoke (Object[])

[To be supplied.]

[Visual Basic]
Overloads Public Function Invoke( _
   ByVal parameters() As Object _
) As Object
[C#]
public object Invoke(
   object[] parameters
);
[C++]
public: Object* Invoke(
   Object* parameters[]
);
[JScript]
public function Invoke(
   parameters : Object[]
) : Object;

Parameters

parameters
An array of values that matches the number, order and type (under the constraints of the default binder) of the parameters for this constructor. If this constructor takes no parameters then either an array with 0 elements or a null reference should be used (e.g., Variant[] parameters = new Variant[0];). If the parameters contain an uninitialized variant, it is treated a Variant.Empty, which, with the default binder, can be widened to 0, 0.0 or String.

Return Value

Returns an instance of the class associated with the constructor.

Exceptions

Exception Type Condition
AccessException The attempt to access the constructor fails (e.g., the class may be abstract) or the method is a class initializer.
ArgumentException The parameters array does not contain values that match the number, type, and order of the parameters accepted by this constructor.
TargetInvocationException The constructor being invoked throws an exception. The InnerException property of the TargetInvocationException will hold the exception thrown by the constructor.

Remarks

The number, type, and order of elements in the parameters array should be identical to the number, type, and order of parameters for the constructor reflected by this instance. Before calling the constructor, Invoke will check to see if the caller has access permission and verify that the parameters are legal.

Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked via Reflection whenever the code is fully trusted.

This method is a convenience method for the following overloaded version, using default values. This method cannot be overridden.

See Also

ConstructorInfo Class | ConstructorInfo Members | System.Reflection Namespace | ConstructorInfo.Invoke Overload List