Index number starting point HELL!
-
What A** decided to make collection items start at index 1 and arraylist items start at index 0? Is it this way in C#?
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."
-
What A** decided to make collection items start at index 1 and arraylist items start at index 0? Is it this way in C#?
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."
I believe from something I read in a magazine this week that VB has always had 1 indexing, and certainly ArrayList, as it is part of the .NET Framework, does it properly and starts at 0. I have to use VB at work at the moment. I feel so dirty. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
I believe from something I read in a magazine this week that VB has always had 1 indexing, and certainly ArrayList, as it is part of the .NET Framework, does it properly and starts at 0. I have to use VB at work at the moment. I feel so dirty. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Christian Graus wrote: I believe from something I read in a magazine this week that VB has always had 1 indexing Yeah, but there used to be a way to force it to use 0 based indexing... Looks like like that is gone now... This is just one of those annoying things that makes VB seem.. Oh, I don't know... I guess I will use 'odd' for lack of a better (more PC) term at the moment. Don't get me wrong, I love VB because I am used to it...
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."
-
What A** decided to make collection items start at index 1 and arraylist items start at index 0? Is it this way in C#?
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."
That only applies to the
Collection
class in theMicrosoft.VisualBasic
namespace, and is there for backwards compatability with VB6. If you use one of the classes from theSystem.Collections
orSystem.Collections.Specialized
namespaces, the indexing starts at 0.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
I believe from something I read in a magazine this week that VB has always had 1 indexing, and certainly ArrayList, as it is part of the .NET Framework, does it properly and starts at 0. I have to use VB at work at the moment. I feel so dirty. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Christian Graus wrote: I have to use VB at work at the moment. I feel so dirty. I have a feeling this will appear as someone's signature soon. ;P CG, so you are using VB at work now?
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
-
Christian Graus wrote: I have to use VB at work at the moment. I feel so dirty. I have a feeling this will appear as someone's signature soon. ;P CG, so you are using VB at work now?
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
I've always had to use it from time to time, I hate VB from exposure to it, not from assumptions or because it's trendy to do so. Right now we are writing a COM dll to bridge ASP and ASP.NET sessions and VB simply makes sense because to do so in C++ would be so much more verbose. I still would have done it in C++, but my boss presented a 60% done project in VB. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
I've always had to use it from time to time, I hate VB from exposure to it, not from assumptions or because it's trendy to do so. Right now we are writing a COM dll to bridge ASP and ASP.NET sessions and VB simply makes sense because to do so in C++ would be so much more verbose. I still would have done it in C++, but my boss presented a 60% done project in VB. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Christian Graus wrote: VB simply makes sense because to do so in C++ would be so much more verbose. I never thought I would hear/read you utter those words, however I do have to agree as to do somethings in VB are much faster than C++, however there are many things as I am learning that can be done in C++ that just can't be done in VB.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
-
Christian Graus wrote: VB simply makes sense because to do so in C++ would be so much more verbose. I never thought I would hear/read you utter those words, however I do have to agree as to do somethings in VB are much faster than C++, however there are many things as I am learning that can be done in C++ that just can't be done in VB.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
Nick Parker wrote: however there are many things as I am learning that can be done in C++ that just can't be done in VB. Absolutely. I have to write my own linked list because VB does not provide one. How is that remotely a programming language ? But as I said, if I had started it, I would have done it in C++. We still haven't figured out how to debug our dll. And the syntax is just crap. There are so many examples of design with no thought for the consequences, it's really quite frustrating. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002