C# goto statement

The C# goto statement is an unconditional statement that let the control go to a particular label mentioned in the statement.

In some cases, the C# goto statement is useful to get out of the deeply nested loops.

C# goto statement Syntax

goto start;

Where goto is the keyword and start is the label name.

There are two forms of goto statements.

C# Forward jump

C# goto Statement 1

Backward jump

C# goto Statement 2

In general, usage of the goto is not recommended in the real-time environment, because it becomes difficult to trace the control during the C# program execution.