GetILGenerator Method (Int32)
Collapse the table of content
Expand the table of content

MethodBuilder.GetILGenerator Method (Int32)

Returns an ILGenerator for this method with the specified Microsoft intermediate language (MSIL) stream size.

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

public ILGenerator GetILGenerator(
	int size
)

Parameters

size
Type: System.Int32
The size of the MSIL stream, in bytes.

Return Value

Type: System.Reflection.Emit.ILGenerator
An ILGenerator object for this method.

ExceptionCondition
InvalidOperationException

The method should not have a body because of its MethodAttributes or MethodImplAttributes flags, for example because it has the MethodAttributes.PinvokeImpl flag.

-or-

The method is a generic method, but not a generic method definition. That is, the IsGenericMethod property is true, but the IsGenericMethodDefinition property is false.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2016 Microsoft