Rediger

Del via


ExceptionRegionEncoder.Add Method

Definition

Adds an exception clause.

public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder Add (System.Reflection.Metadata.ExceptionRegionKind kind, int tryOffset, int tryLength, int handlerOffset, int handlerLength, System.Reflection.Metadata.EntityHandle catchType = default, int filterOffset = 0);
member this.Add : System.Reflection.Metadata.ExceptionRegionKind * int * int * int * int * System.Reflection.Metadata.EntityHandle * int -> System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder
Public Function Add (kind As ExceptionRegionKind, tryOffset As Integer, tryLength As Integer, handlerOffset As Integer, handlerLength As Integer, Optional catchType As EntityHandle = Nothing, Optional filterOffset As Integer = 0) As ExceptionRegionEncoder

Parameters

kind
ExceptionRegionKind

Clause kind.

tryOffset
Int32

Try block start offset.

tryLength
Int32

Try block length.

handlerOffset
Int32

Handler start offset.

handlerLength
Int32

Handler length.

filterOffset
Int32

Offset of the filter block, or 0 if the kind is not Filter.

Returns

Encoder for the next clause.

Exceptions

catchType is invalid.

kind has an invalid value.

-or-

tryOffset, tryLength, handlerOffset, or handlerLength is out of range.

Method body was not declared to have exception regions.

Applies to