ExceptionHandler(Int32, Int32, Int32, Int32, Int32, ExceptionHandlingClauseOptions, Int32) ExceptionHandler(Int32, Int32, Int32, Int32, Int32, ExceptionHandlingClauseOptions, Int32) ExceptionHandler(Int32, Int32, Int32, Int32, Int32, ExceptionHandlingClauseOptions, Int32) ExceptionHandler(Int32, Int32, Int32, Int32, Int32, ExceptionHandlingClauseOptions, Int32) Constructor

定义

使用指定的参数初始化 ExceptionHandler 类的新实例。Initializes a new instance of the ExceptionHandler class with the specified parameters.

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 Int32 Int32 Int32

此异常处理程序受保护的第一个指令的字节偏移量。The byte offset of the first instruction protected by this exception handler.

tryLength
Int32 Int32 Int32 Int32

由此异常处理程序保护的字节数。The number of bytes protected by this exception handler.

filterOffset
Int32 Int32 Int32 Int32

筛选器代码的开始的字节偏移量。The byte offset of the beginning of the filter code. 筛选器代码在处理程序块的第一条指令结束。The filter code ends at the first instruction of the handler block. 对于非筛选异常处理程序,把此参数指定为0。For non-filter exception handlers, specify 0 (zero) for this parameter.

handlerOffset
Int32 Int32 Int32 Int32

此异常处理程序的第一个指令的字节偏移量。The byte offset of the first instruction of this exception handler.

handlerLength
Int32 Int32 Int32 Int32

在此异常处理程序中的字节数。The number of bytes in this exception handler.

kind
ExceptionHandlingClauseOptions ExceptionHandlingClauseOptions ExceptionHandlingClauseOptions ExceptionHandlingClauseOptions

枚举值之一,指定异常处理程序的类型。One of the enumeration values that specifies the kind of exception handler.

exceptionTypeToken
Int32 Int32 Int32 Int32

该异常处理程序处理的异常标记类型。The token of the exception type handled by this exception handler. 如果不适用,则指定 0(零)。If not applicable, specify 0 (zero).

异常

tryOffsetfilterOffsethandlerOffsettryLengthhandlerLength 为负。tryOffset, filterOffset, handlerOffset, tryLength, or handlerLength are negative.

适用于