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.
Type | Visual Basic .NET | C# |
---|---|---|
Selection | Select Case | switch |
Decision | If...Then | if...else |
Looping | While | Do |
Do
Do Until Loop While Loop Until | While | |
Looping structure or collections | For For Each | for 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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.