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

.NET Framework (current version)
 

Initializes a new instance of the ExceptionHandler class with the specified parameters.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public ExceptionHandler(
	int tryOffset,
	int tryLength,
	int filterOffset,
	int handlerOffset,
	int handlerLength,
	ExceptionHandlingClauseOptions kind,
	int exceptionTypeToken
)

Parameters

tryOffset
Type: System.Int32

The byte offset of the first instruction protected by this exception handler.

tryLength
Type: System.Int32

The number of bytes protected by this exception handler.

filterOffset
Type: System.Int32

The byte offset of the beginning of the filter code. The filter code ends at the first instruction of the handler block. For non-filter exception handlers, specify 0 (zero) for this parameter.

handlerOffset
Type: System.Int32

The byte offset of the first instruction of this exception handler.

handlerLength
Type: System.Int32

The number of bytes in this exception handler.

kind
Type: System.Reflection.ExceptionHandlingClauseOptions

One of the enumeration values that specifies the kind of exception handler.

exceptionTypeToken
Type: System.Int32

The token of the exception type handled by this exception handler. If not applicable, specify 0 (zero).

Exception Condition
ArgumentOutOfRangeException

tryOffset, filterOffset, handlerOffset, tryLength, or handlerLength are negative.

.NET Framework
Available since 4.5
Return to top
Show: