Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetConstructorImpl Method

TypeBuilder.GetConstructorImpl Method

.NET Framework 1.1

Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.

[Visual Basic]
Overrides Protected Function GetConstructorImpl( _
   ByVal bindingAttr As BindingFlags, _
   ByVal binder As Binder, _
   ByVal callConvention As CallingConventions, _
   ByVal types() As Type, _
   ByVal modifiers() As ParameterModifier _
) As ConstructorInfo
[C#]
protected override ConstructorInfo GetConstructorImpl(
 BindingFlags bindingAttr,
 Binder binder,
 CallingConventions callConvention,
 Type[] types,
 ParameterModifier[] modifiers
);
[C++]
protected: ConstructorInfo* GetConstructorImpl(
 BindingFlags bindingAttr,
 Binder* binder,
 CallingConventions callConvention,
 Type* types[],
 ParameterModifier modifiers[]
);
[JScript]
protected override function GetConstructorImpl(
   bindingAttr : BindingFlags,
 binder : Binder,
 callConvention : CallingConventions,
 types : Type[],
 modifiers : ParameterModifier[]
) : ConstructorInfo;

Parameters

bindingAttr
A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

Zero, to conduct a case-sensitive search for public methods.

binder
A Binder object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.

-or-

A null reference (Nothing in Visual Basic), to use the DefaultBinder.

callConvention
The CallingConventions object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and the stack is cleaned up.
types
An array of Type objects representing the number, order, and type of the parameters for the constructor to get.

-or-

An empty array of the type Type (that is, Type[] types = new Type[0]) to get a constructor that takes no parameters.

modifiers
An array of ParameterModifier objects representing the attributes associated with the corresponding element in the types array.

Return Value

A ConstructorInfo object representing the constructor that matches the specified requirements, if found; otherwise, a null reference (Nothing in Visual Basic).

Exceptions

Exception Type Condition
NotSupportedException This method is not implemented for incomplete type.

Remarks

Retrieve the type using GetType or GetType and use reflection on the retrieved type.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace

Show:
© 2015 Microsoft