Using Decision Structures

Now that you have an understanding of the common data types and common operators, you can dig into using decision structures. Decision structures are program elements that control the flow of your application based on decisions made about the value of variables or events fired by the user.

Table 8.5 lists the decision structures by group in Visual Basic .NET and C# and gives the keywords that you'll use when implementing decision structures in your code.

Table 8.5. Summary of Decision Structures in Visual Basic .NET and C#
TypeVisual Basic .NETC#
SelectionSelect Caseswitch

Do Until

Loop While

Loop Until
Looping structure or collectionsFor For Eachfor foreach

We'll go through ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.

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