Total .NET Analyzer Rule Documentation  

UseOfGoTo Rule

Avoid using GoTo statements.

Remarks

The GoTo statement causes your application to branch to the line specified. While this may seem convenient, GoTo statements make your code hard to read and maintain. Whenever possible, you should avoid using GoTo statements.

Resolution

In general, you will be able to replace GoTo statements with Do...Loop, For...Next, If...Then...Else, Select Case, Try...Catch...Finally, While, and With...End With structures.

See Also

VB GoTo Statement

C# goto Statement