System.Reflection.Emit.ConstructorBuilder.GetILGenerator Method

Gets an System.Reflection.Emit.ILGenerator object, with the specified MSIL stream size, that can be used to build a method body for this constructor.

Syntax

public ILGenerator GetILGenerator (int streamSize)

Parameters

streamSize
The size of the MSIL stream, in bytes.

Returns

An System.Reflection.Emit.ILGenerator for this constructor.

Remarks

The runtime generates the code for default constructors. Therefore, if an attempt is made to obtain an ILGenerator for a default constructor, an exception is thrown.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0