Most tutorials don't spend much time on it, but one of the critical skills in programming is the ability to quickly read and understand the documentation available from software vendors - especially Microsoft. The book has a good example of If-Then-Else and Select Case, including the important concept of "short-circuiting" a decision - a new feature of VB.NET that was borrowed from languages like C and C++. Click the link to read my article on the same subject, VB.NET New Logical Operators.
But the book doesn't present the same view of the syntax that you'll find at Microsoft. The first decision structure explained is the If-Then-Else structure . (It's just called If-Then in the book - but I like this more complete name.) The syntax diagram you will see at Microsoft looks like the illustration shown. This diagram will tell you just how to write the statement if you know how to understand it. Lets look at the main features now.
Notice how words like If, Then, and Else are in bold with initial capital letters. This means that these words are specific required keywords in VB.NET. If you use them in a program statement, they have to be spelled exactly that way. The words condition and statements, on the other hand, are all lower case and in italics. This means that it's information you supply (even though there are still rules on what has to be there). Now notice that [ Then ] and [ statements ] are in brackets. Something inside brackets is optional.


