System.CodeDom.CodeThrowExceptionStatement Class

Represents a statement that throws an exception.

See Also: CodeThrowExceptionStatement Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class CodeThrowExceptionStatement : CodeStatement

Remarks

System.CodeDom.CodeThrowExceptionStatement can represent a statement that throws an exception. The expression should be, or evaluate to, a reference to an instance of a type that derives from the Exception class.

The CodeThrowExceptionStatement.ToThrow property specifies the exception to throw.

Requirements

Namespace: System.CodeDom
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0