System.Reflection.Emit.MethodBuilder.CreateMethodBody Method

Creates the body of the method using a supplied byte array of Microsoft intermediate language (MSIL) instructions.

Syntax

public void CreateMethodBody (byte[] il, int count)

Parameters

il
An array containing valid MSIL instructions. If this parameter is null, the method's body is cleared.
count
The number of valid bytes in the MSIL array. This value is ignored if MSIL is null.

Remarks

This method creates the method's body from il, an array containing MSIL instructions as opcodes. The number of bytes of valid MSIL is given by count.

Note:

This is currently not fully supported. The user cannot supply the location of token fix ups and exception handlers.

Requirements

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