Jumping Statements

The control statements described so far make a program jump to various pieces of code. Depending on conditions, the program may jump to a particular code block or jump over other code blocks.

The statements are intuitive, so the jumps are easy to understand—and in fact, it’s easy to understand a While loop without even thinking about the fact that the loop makes the program jump from the end of the loop to the beginning.

Many programming languages provide a few less structured ways to let a program jump from one place to another. The least structured of these is the Go To statement.

Go To

The Go To statement makes the program immediately jump to an arbitrary line of code. The pseudocode for a Go To statement looks like the following: ...

Get Start Here!™ Fundamentals of Microsoft® .NET Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.