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.ThrowException

Emits an instruction to throw an exception.

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

Parameters

excType
The class of the type of exception to throw.

Exceptions

Exception Type Condition
ArgumentException if excType is not the Exception class or a subclass of Exception or if the type does not have a default constructor
ArgumentNullException if excType is a null reference (in Visual Basic Nothing)

See Also

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