System.CodeDom.CodeGotoStatement Class

Represents a goto statement.

See Also: CodeGotoStatement Members


public class CodeGotoStatement : CodeStatement


System.CodeDom.CodeGotoStatement can be used to represent a goto statement, which is used in some languages to redirect program flow to a specified label.

The CodeGotoStatement.Label property indicates the name of the label at which to continue program execution.


Not all languages support goto statements. Call the System.CodeDom.Compiler.ICodeGenerator.Supports(System.CodeDom.Compiler.GeneratorSupport) method with the System.CodeDom.Compiler.GeneratorSupport.GotoStatements flag to determine whether a code generator supports goto statements.


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