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 );
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) |
ILGenerator Class | ILGenerator Members | System.Reflection.Emit Namespace