0-index in vb.net

atesh

Active member
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 its only natural that
VB.NET would follow suit. Goodness knows why VB6 wasnt that
way.
 
The Collection is part of the VB runtime designed to make the process of moving from vb6 to vb.net easier. It shouldnt be used, there are a ton of collection classes in System.Collections that should be used instead.
 
Back
Top