Sven Groot wrote: One weird thing about arrays in VB is that you don't specify the length but the upperbound when declaring them. So "Dim myArray(5) As Integer" creates an array of length 6, with indices from 0 to 5 inclusive.
I don't call that "weird", it makes perfect sense to me.
Of course, what's the official C/C++ style?
C/C++ makes more sense. int myArr makes an array of length 5, indices from 0 to 4.
Of course, you won't get indices out of bounds using the foreach loop. I'm so happy it exists.