Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.
2012-04-12
This might look strange to a C programmer:
Dim I(10) As Integer Console.WriteLine(I.Length) Dim J(I.Length - 1) As Integer Console.Write(J.Length)
This will give the output 11 and 11. The array named I has 11 elements because the last index (10) is given when the array is created. The array named J has 11 elements bacause Length (11) – 1 equals 10, and a 0-based array with last element 10 gives you 11 elements. Confusing.
Categories: VB.NET
Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!
Leave a Reply