NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MethodBuilder.CreateMethodBody

Creates the body of the method using the given array of IL instructions.

[Visual Basic]
Public Sub CreateMethodBody( _
   ByVal il() As Byte, _
   ByVal count As Integer _
)
[C#]
public void CreateMethodBody(
   byte[] il,
   int count
);
[C++]
public: void CreateMethodBody(
   unsigned char* il[],
   int count
);
[JScript]
public function CreateMethodBody(
   il : Byte[],
   count : int
);

Parameters

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

Exceptions

Exception Type Condition
ArgumentOutOfRangeException if the count is not withing the range of indices of the supplied IL instruction array
InvalidOperationException if the containing type was previously created using CreateType

Remarks

This method creates the method's body from il, an array containing IL instructions. The number of bytes of valid IL is given by count. Note: This is currently not fully supported.

See Also

MethodBuilder Class | MethodBuilder Members | System.Reflection.Emit Namespace