Share via


Type.GetConstructor Method

Searches for a public instance constructor whose parameters match the types in the specified array of Type objects.

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

Syntax

 [MethodImplAttribute]
public ConstructorInfo GetConstructor (
         Type[] types
)

Parameters

  • types
    An array of Type objects representing the number, order, and type of the parameters you want the constructor to get.

    -or-

    An empty Type array you can use to get a constructor that takes no parameters.

Return Value

A ConstructorInfo object that represents the public instance constructor whose parameters match the types in the specified array, if such a match is found; otherwise, a null reference.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

Type Class
Type Members
System Namespace