Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ConstructorBuilder::GetILGenerator Method (Int32)

 

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

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

public:
ILGenerator^ GetILGenerator(
	int streamSize
)

Parameters

streamSize
Type: System::Int32

The size of the MSIL stream, in bytes.

Return Value

Type: System.Reflection.Emit::ILGenerator^

An ILGenerator for this constructor.

Exception Condition
InvalidOperationException

The constructor is a default constructor.

-or-

The constructor has MethodAttributes or MethodImplAttributes flags indicating that it should not have a method body.

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.

.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Return to top
Show:
© 2017 Microsoft