4.2.1.1 One blank line is always used in between the local variables in a method and its first statement
4.2.1.2 One blank line is always used after the closing of a code block that is not followed by another closing code.
4.2.1.1 One blank line is always used in between the local variables in a method and its first statement
4.2.1.2 One blank line is always used after the closing of a code block that is not followed by another closing code.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 19, 2012, 11:31 AM
The first one means that you first declare the local variables used in a method and then leave a blank line before the executable code.
The second one means that you should always leave a blank line after closing a code block (If, For, While etc statements) unless it's followed by the closure of another code block in which it's nested.
For example:
Public Sub MyMethod()
Dim i As Integer = 1
Dim j As Integer = 2
Dim k As Integer
Dim l As Integer
Dim m As Integer
Dim n As Integer = 0
k = i + j ' leave blank line after variable declarations
For l = 0 To i
For m = j To k
n += l * m
Next m ' no blank line as followed by another Next statement
Next n ' leave blank line as Next not followed by another closure
Console.WriteLine(n)
End Sub