[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;
Returns an instance of the class associated with the constructor.
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. |
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.
ConstructorInfo Class | ConstructorInfo Members | System.Reflection Namespace | ConstructorInfo.Invoke Overload List