Mono Class Library: System.Reflection.ConstructorInfo Overview | Members

System.Reflection.ConstructorInfo.Invoke Method

Invokes the constructor reflected by the current instance using the specified parameters. [Edit]

[System.Diagnostics.DebuggerStepThrough]
public object Invoke (object[] parameters)

Parameters

parameters
An array of objects that match the number, order and type of the parameters for the constructor reflected by the current instance. If the constructor reflected by the current instance takes no parameters, specify either an array with zero elements or null.
Note: 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.
[Edit]

Returns

An instance of the class that declared the constructor reflected by the current instance. [Edit]

Permissions

TypeReason
System.Security.Permissions.ReflectionPermission [Edit] Requires permission to invoke non-public members of loaded assemblies. See System.Security.Permissions.ReflectionPermissionFlag.MemberAccess.

Exceptions

TypeReason
ArgumentExceptionThe types of the elements of parameters do not match the types of the parameters accepted by the constructor reflected by the current instance, under the constraints of the default binder. [Edit]
MethodAccessExceptionThe caller does not have the required permissions. [Edit]
System.Reflection.TargetInvocationExceptionThe constructor reflected by the current instance threw an exception. [Edit]
System.Reflection.TargetParameterCountExceptionparameters.Length does not equal the number of parameters required by the contract of the constructor reflected by the current instance. [Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0