Multiple Statements in a Single Line in VB.NET
Placing Multiple Statements in a Single Line
Placing Multiple Statements in a Single Line
If you need to place multiple statements in a single line, you can separate statements with a colon. The code snippet in Listing 4 places three statements in a single line.
Function MultipleStatementInSingleLine(ByVal NumberOne As Integer, _
ByVal NumberTwo As Integer) As Integer
Dim total As Integer = NumberOne + NumberTwo : Dim difference = NumberOne - NumberTwo : Return total
End Function