<PackageReference Include="System.Reflection.Metadata" Version="11.0.0-rc.3.26522.148" />

System.Reflection.Metadata.MethodBodyBlock

public sealed class MethodBodyBlock
Represents the method body in ECMA 335 assembly.

Gets the array of exception regions in this method body.

Gets the handle to the local variables signature.

public bool LocalVariablesInitialized { get; }

Gets a value that indicates whether local variables in this method are initialized to default values of their types.

public int MaxStack { get; }

Gets the maximum number of items on the evaluation stack for this method.

public int Size { get; }

Gets the size of the method body, including the header, IL, and exception regions.

public static MethodBodyBlock Create(BlobReader reader)

Creates a new instance of the MethodBodyBlock class using the specified blob reader.

public byte[] GetILBytes()

Gets the IL bytecode of this method body as a byte array.

Gets the IL bytecode of this method body as an immutable array.

Gets a blob reader that reads the IL bytecode of this method body.