public class Test
public Shared Sub Main
For i As Integer = 1 To 5
Dim j As Integer = 3
If i = j Then
Dim M As Integer = i + j
Console.WriteLine("M: " & M)
Else
Dim N As Integer = i * j
Console.WriteLine("N: " & N)
End If
Dim k As Integer = 123
Console.WriteLine("k: " & k)
Next i
End Sub
End class
N: 3
k: 123
N: 6
k: 123
M: 6
k: 123
N: 12
k: 123
N: 15
k: 123