J
jhightow
The following code :
For i as system.Int32 = 0 to 4
If i < 2 Then
Dim s as System.String
s &= i.ToString
Console.WriteLine(s)
End If
Next
For i as system.Int32 = 0 to 4
If i < 3 Then
Dim n as System.Int32
n += i
Console.WriteLine(n)
End If
Next
Returns the following results :
0
01
0
1
3
Could someone explain why s is not set to nothing and n is not set 0.
At start of each loop.
For i as system.Int32 = 0 to 4
If i < 2 Then
Dim s as System.String
s &= i.ToString
Console.WriteLine(s)
End If
Next
For i as system.Int32 = 0 to 4
If i < 3 Then
Dim n as System.Int32
n += i
Console.WriteLine(n)
End If
Next
Returns the following results :
0
01
0
1
3
Could someone explain why s is not set to nothing and n is not set 0.
At start of each loop.