O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Jumping Guidelines

All jumping statements break the normal flow of an application, so they make the code harder to understand. To avoid confusion, you should use them as little as possible.

Of these statements, the Return statement seems the least confusing. It exits a routine so that a programmer reading the code doesn’t need to look at that routine anymore.

Despite its relative simplicity, some developers never use Return. Instead, they write code that always exits a routine by executing the last line of code. The thought is that having a single exit point makes it easier to figure out where the routine is exiting.

The Exit and Continue statements are the next least confusing. Their general ideas aren’t too complicated, but a programmer reading ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required