CodeCatchClause Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the CodeCatchClause class.
Overloads
CodeCatchClause() |
Initializes a new instance of the CodeCatchClause class. |
CodeCatchClause(String) |
Initializes a new instance of the CodeCatchClause class using the specified local variable name for the exception. |
CodeCatchClause(String, CodeTypeReference) |
Initializes a new instance of the CodeCatchClause class using the specified local variable name for the exception and exception type. |
CodeCatchClause(String, CodeTypeReference, CodeStatement[]) |
Initializes a new instance of the CodeCatchClause class using the specified local variable name for the exception, exception type and statement collection. |
CodeCatchClause()
- Source:
- CodeCatchClause.cs
- Source:
- CodeCatchClause.cs
Initializes a new instance of the CodeCatchClause class.
public:
CodeCatchClause();
public CodeCatchClause ();
Public Sub New ()
Applies to
CodeCatchClause(String)
- Source:
- CodeCatchClause.cs
- Source:
- CodeCatchClause.cs
Initializes a new instance of the CodeCatchClause class using the specified local variable name for the exception.
public:
CodeCatchClause(System::String ^ localName);
public CodeCatchClause (string localName);
new System.CodeDom.CodeCatchClause : string -> System.CodeDom.CodeCatchClause
Public Sub New (localName As String)
Parameters
- localName
- String
The name of the local variable declared in the catch clause for the exception. This is optional.
See also
Applies to
CodeCatchClause(String, CodeTypeReference)
- Source:
- CodeCatchClause.cs
- Source:
- CodeCatchClause.cs
Initializes a new instance of the CodeCatchClause class using the specified local variable name for the exception and exception type.
public:
CodeCatchClause(System::String ^ localName, System::CodeDom::CodeTypeReference ^ catchExceptionType);
public CodeCatchClause (string localName, System.CodeDom.CodeTypeReference catchExceptionType);
new System.CodeDom.CodeCatchClause : string * System.CodeDom.CodeTypeReference -> System.CodeDom.CodeCatchClause
Public Sub New (localName As String, catchExceptionType As CodeTypeReference)
Parameters
- localName
- String
The name of the local variable declared in the catch clause for the exception. This is optional.
- catchExceptionType
- CodeTypeReference
A CodeTypeReference that indicates the type of exception to catch.
Applies to
CodeCatchClause(String, CodeTypeReference, CodeStatement[])
- Source:
- CodeCatchClause.cs
- Source:
- CodeCatchClause.cs
Initializes a new instance of the CodeCatchClause class using the specified local variable name for the exception, exception type and statement collection.
public:
CodeCatchClause(System::String ^ localName, System::CodeDom::CodeTypeReference ^ catchExceptionType, ... cli::array <System::CodeDom::CodeStatement ^> ^ statements);
public CodeCatchClause (string localName, System.CodeDom.CodeTypeReference catchExceptionType, params System.CodeDom.CodeStatement[] statements);
new System.CodeDom.CodeCatchClause : string * System.CodeDom.CodeTypeReference * System.CodeDom.CodeStatement[] -> System.CodeDom.CodeCatchClause
Public Sub New (localName As String, catchExceptionType As CodeTypeReference, ParamArray statements As CodeStatement())
Parameters
- localName
- String
The name of the local variable declared in the catch clause for the exception. This is optional.
- catchExceptionType
- CodeTypeReference
A CodeTypeReference that indicates the type of exception to catch.
- statements
- CodeStatement[]
An array of CodeStatement objects that represent the contents of the catch block.