PEReaderExtensions.GetMethodBody(PEReader, Int32) Method

Definition

Returns a body block of a method with the specified Relative Virtual Address (RVA).

C#
public static System.Reflection.Metadata.MethodBodyBlock GetMethodBody(this System.Reflection.PortableExecutable.PEReader peReader, int relativeVirtualAddress);

Parameters

peReader
PEReader

The current PEReader instance.

relativeVirtualAddress
Int32

The Relative Virtual Address (RVA).

Returns

A method block body instance.

Exceptions

peReader is null.

The body is not found in the metadata or is invalid.

The section where the method is stored is not available.

IO error occurred while reading from the underlying stream.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0