So ... following the diagram on the previous page ... you could code an If-Then-Else as ...
~~~~~~~~~~~~~~~~~~~~~~~~~
If condition1 Then
statement1
statement2
End If
~~~~~~~~~~~~~~~~~~~~~~~~~
or
~~~~~~~~~~~~~~~~~~~~~~~~~
If condition3 Then
statement4
ElseIf condition5 Then
statement6
End If
~~~~~~~~~~~~~~~~~~~~~~~~~
... in addition to many other possibilities. The Intellisense feature in Visual Studio .NET helps a lot too by filling in part of the statements for you. These diagrams aren't as foolproof as the BNF (Backus-Naur Form) that was explained in the previous chapter. For example, the diagram would seem to suggest that ...
~~~~~~~~~~~~~~~~~~~~~~~~~
If condition
End If
~~~~~~~~~~~~~~~~~~~~~~~~~
... is a legal structure. But Visual Studio fills in Thenfor you automatically. Another point is that you are free to code completely meaningless statements, such as ...
~~~~~~~~~~~~~~~~~~~~~~~~~
If condition Then
End If
~~~~~~~~~~~~~~~~~~~~~~~~~
VB.NET will compile and run them just like statements that actually do something!

