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.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- streamSize
-
Type:
System::Int32
The size of the MSIL stream, in bytes.
| 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.
Available since 2.0
Silverlight
Available since 2.0