DynamicMethodExtensionsGetIlAsByteArray Method

Returns the MSIL for the method body of the source DynamicMethod, as an array of bytes.

This is the necessary equivalent for GetILAsByteArray function, because GetILAsByteArray will not work with the method body returned by an GetMethodBody function since the IL code is stored in the MethodBuilder's ILGenerator.

Definition

Namespace: DevCase.Extensions.DynamicMethodExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static byte[] GetIlAsByteArray(
	this DynamicMethod dynMethod
)

Parameters

dynMethod  DynamicMethod
The source DynamicMethod.

Return Value

Byte
The MSIL for the method body of the source DynamicMethod, as an array of bytes.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DynamicMethod. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Example

This is a code example #1.
C#
No code example is currently available or this language may not be supported.

See Also