Okay, we have too many geeks beating dead farm animals here.
Arguably, one could say that the
Then and
End If keywords equate to curly braces since they surround the code block to be executed conditionally.
Alternatively (this is my take), one can argue that while the
End If is completely analogous to the closing curly brace, the opening curly brace is only implied. The
Then keyword is, to an extent, a relic from a time when the only
If statement was a single-line
If statement (though the
Then would still be a necessity for a single-line
If statement). Since in VB the conditional expression isn't required to be surrounded in parentheses, the
Then is necessary to syntactically separate the conditional expression and the conditionally executed code statements, hence it might be more analogous to the closing parenthesis of the conditional expression (this is consistent with single-line
If statements too), or possibly the combination of the closing parenthesis and the opening brace (the opening parenthesis would be implied).
Here is one interpretation of the syntactical analogy:
Code:
Multi-line
C# VB
--------------
if( If
<conditional expression>
) { Then
<conditionally executed code>
} End If
Single-line
C# VB
--------------
if( If
<conditional expression>
) <code> Then <code>
Take that, you effing horse.