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!

MethodRental.SwapMethodBody

Swaps the body of a method.

[Visual Basic]
Public Shared Sub SwapMethodBody( _
   ByVal cls As Type, _
   ByVal methodtoken As Integer, _
   ByVal rgIL As Integer, _
   ByVal methodSize As Integer, _
   ByVal flags As Integer _
)
[C#]
public static void SwapMethodBody(
   Type cls,
   int methodtoken,
   int rgIL,
   int methodSize,
   int flags
);
[C++]
public: static void SwapMethodBody(
   Type* cls,
   int methodtoken,
   int rgIL,
   int methodSize,
   int flags
);
[JScript]
public static function SwapMethodBody(
   cls : Type,
   methodtoken : int,
   rgIL : int,
   methodSize : int,
   flags : int
);

Parameters

cls
The class containing the method.
methodtoken
The token for the method.
rgIL
A pointer to the method.
methodSize
The size of the new method body in bytes.
flags
Flags that control the swapping.

See Also

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