ExceptionRegionEncoder.Add 方法

定義

加入例外狀況子句。

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

參數

kind
ExceptionRegionKind

子句種類。

tryOffset
Int32

請嘗試區塊開始位移。

tryLength
Int32

請嘗試區塊長度。

handlerOffset
Int32

處理程序開始位移。

handlerLength
Int32

處理程序長度。

filterOffset
Int32

filter 區塊的位移,如果 kind 不是 Filter,則為 0。

傳回

下一個子句的編碼器。

例外狀況

catchType 無效。

kind 的值無效。

-或-

tryOffsettryLengthhandlerOffsethandlerLength 超出範圍。

方法主體未宣告為有例外狀況區域。

適用於