ExceptionRegionEncoder.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
- catchType
- EntityHandle
TypeDefinitionHandle, TypeReferenceHandle or TypeSpecificationHandle, or nil if kind
is not Catch.
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.