Compartir a través de


ConstructorInfo.Invoke Method

Invokes the constructor reflected by the object that has the specified parameters, and provides default values for the parameters that are not commonly used.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

Syntax

[DebuggerHiddenAttribute]
[DebuggerStepThroughAttribute]
[MethodImplAttribute]
public Object Invoke (
         Object[] parameters
)

Parameters

  • parameters
    An array of values that matches the number, order and type (under the constraints of the default binder) of the parameters for the invoked constructor. If this constructor takes no parameters, use either an array with 0 (zero) elements or a null reference, 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. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.

Return Value

An object of the type (class) associated with the invoked constructor.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

ConstructorInfo Class
ConstructorInfo Members
System.Reflection Namespace