T
tshad
Why does VB.Net convert:
Dim CCNumber as String = "123"
For i As Integer = 0 To (CCNumber.Text.Length / 2)
to
For i As Integer = 0 To 1.5
In C# it leaves the conversion as an integer and truncates it, so that 3/2 =
1 and 4/2 = 2 and 5/2 = 2.
Thanks,
Tom
Dim CCNumber as String = "123"
For i As Integer = 0 To (CCNumber.Text.Length / 2)
to
For i As Integer = 0 To 1.5
In C# it leaves the conversion as an integer and truncates it, so that 3/2 =
1 and 4/2 = 2 and 5/2 = 2.
Thanks,
Tom