System.CodeDom.CodeLabeledStatement Class

Represents a labeled statement or a stand-alone label.

See Also: CodeLabeledStatement Members

Syntax

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

Remarks

System.CodeDom.CodeLabeledStatement represents a label and optionally, an associated statement. A label can be used to indicate the target of a System.CodeDom.CodeGotoStatement.

The CodeLabeledStatement.Statement property is optional. To create only a label, leave the CodeLabeledStatement.Statement property uninitialized.

Note:

Not all languages support goto statements and labels, so you should test wheter a code generator supports goto statements and labels by calling the System.CodeDom.Compiler.ICodeGenerator.Supports(System.CodeDom.Compiler.GeneratorSupport) method with the System.CodeDom.Compiler.GeneratorSupport.GotoStatements flag.

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