0-index in vb.net

atesh

Freshman
Joined
Aug 2, 2003
Messages
41
Location
Washington State, USA
Is there any reason why some objects in VB.NET count with the first item being 0, instead of 1. (e.g. the listbox)
Anybody know why they do this? It ends up making things more confusing/complicated.
 
If Microsoft did everything correctly, ALL arrays, collections,
hash tables, string characters, etc. should have a base index of 0
(except, of course for the archaic Collection class). This is the way
all other programming languages do it, so it's only natural that
VB.NET would follow suit. Goodness knows why VB6 wasn't that
way.
 
The Collection is part of the VB runtime designed to make the process of moving from vb6 to vb.net easier. It shouldn't be used, there are a ton of collection classes in System.Collections that should be used instead.
 
Back
Top