ExceptionHandler 建構函式

定義

初始化一個新的類別實例 ExceptionHandler ,並以指定參數進行。

public:
 ExceptionHandler(int tryOffset, int tryLength, int filterOffset, int handlerOffset, int handlerLength, System::Reflection::ExceptionHandlingClauseOptions kind, int exceptionTypeToken);
public ExceptionHandler(int tryOffset, int tryLength, int filterOffset, int handlerOffset, int handlerLength, System.Reflection.ExceptionHandlingClauseOptions kind, int exceptionTypeToken);
new System.Reflection.Emit.ExceptionHandler : int * int * int * int * int * System.Reflection.ExceptionHandlingClauseOptions * int -> System.Reflection.Emit.ExceptionHandler
Public Sub New (tryOffset As Integer, tryLength As Integer, filterOffset As Integer, handlerOffset As Integer, handlerLength As Integer, kind As ExceptionHandlingClauseOptions, exceptionTypeToken As Integer)

參數

tryOffset
Int32

第一個指令的位元組偏移量由此例外處理程序保護。

tryLength
Int32

此例外處理器所保護的位元組數。

filterOffset
Int32

過濾碼開頭的位元組偏移量。 過濾碼在處理器區塊的第一條指令結束。 對於非過濾器例外處理程序,該參數指定為 0(0)。

handlerOffset
Int32

此異常處理程序第一條指令的位元組偏移量。

handlerLength
Int32

這個例外處理器的位元組數。

kind
ExceptionHandlingClauseOptions

其中一個列舉值,用來指定例外處理程序的種類。

exceptionTypeToken
Int32

此例外處理器處理的異常類型的標記。 若不適用,請指定 0(零)。

例外狀況

tryOffset、、filterOffsethandlerOffsettryLength、或handlerLength為負。

適用於