atesh Posted September 8, 2003 Posted September 8, 2003 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. Quote To err is human, to really foul things up requires a computer.
*Experts* Bucky Posted September 8, 2003 *Experts* Posted September 8, 2003 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. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Experts* Nerseus Posted September 9, 2003 *Experts* Posted September 9, 2003 Other than the Collection class, I can't think of any 1-based objects in .NET. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
*Gurus* divil Posted September 9, 2003 *Gurus* Posted September 9, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.