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.DefineDefaultConstructor

Defines the default constructor. The constructor defined here will simply call the default constructor of the parent.

[Visual Basic]
Public Function DefineDefaultConstructor( _
   ByVal attributes As MethodAttributes _
) As ConstructorBuilder
[C#]
public ConstructorBuilder DefineDefaultConstructor(
   MethodAttributes attributes
);
[C++]
public: ConstructorBuilder* DefineDefaultConstructor(
   MethodAttributes attributes
);
[JScript]
public function DefineDefaultConstructor(
   attributes : MethodAttributes
) : ConstructorBuilder;

Parameters

attributes
A MethodAttributes object representing the attributes to be applied to the constructor.

Return Value

Returns the constructor.

Exceptions

Exception Type Condition
NotSupportedException if the parent class does not have a default constructor

Remarks

Since the default constructor is automatically defined, it is only necessary to call this method if the attributes on the default constructor should be set to something other than MethodBase.Constructor. This method is provided here to make it easier to set the attributes.

See Also

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