NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeBuilder.DefineConstructor

Adds a new constructor to the class, with the given attributes and signature.

[Visual Basic]
Public Function DefineConstructor( _
   ByVal attributes As MethodAttributes, _
   ByVal callingConvention As CallingConventions, _
   ByVal parameterTypes() As Type _
) As ConstructorBuilder
[C#]
public ConstructorBuilder DefineConstructor(
   MethodAttributes attributes,
   CallingConventions callingConvention,
   Type[] parameterTypes
);
[C++]
public: ConstructorBuilder* DefineConstructor(
   MethodAttributes attributes,
   CallingConventions callingConvention,
   Type* parameterTypes[]
);
[JScript]
public function DefineConstructor(
   attributes : MethodAttributes,
   callingConvention : CallingConventions,
   parameterTypes : Type[]
) : ConstructorBuilder;

Parameters

attributes
The attributes of the constructor.
callingConvention
The calling convention of the constructor.
parameterTypes
The types of the parameters of the constructor.

Return Value

The defined constructor.

Exceptions

Exception Type Condition
InvalidOperationException if the type was previously created using CreateType

See Also

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