NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ILGenerator.BeginCatchBlock

Begins a catch block. Emits a branch instruction to the end of the current exception block.

[Visual Basic]
Overridable Public Sub BeginCatchBlock( _
   ByVal exceptionType As Type _
)
[C#]
public virtual void BeginCatchBlock(
   Type exceptionType
);
[C++]
public: virtual void BeginCatchBlock(
   Type* exceptionType
);
[JScript]
public function BeginCatchBlock(
   exceptionType : Type
);

Parameters

exceptionType
The Type object that represents the exception.

Exceptions

Exception Type Condition
ArgumentException if exceptionType is not a subclass of the Exception class or if the catch block is within a filtered exception
ArgumentNullException if exceptionType is a null reference (in Visual Basic Nothing)
NotSupportedException the IL being generated is not currently in an exception block.

See Also

ILGenerator Class | ILGenerator Members | System.Reflection.Emit Namespace