Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Index number starting point HELL!

Index number starting point HELL!

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasequestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ray Cassick
    wrote on last edited by
    #1

    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."


    C Richard DeemingR 2 Replies Last reply
    0
    • R Ray Cassick

      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."


      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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

      R N 2 Replies Last reply
      0
      • C Christian Graus

        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

        R Offline
        R Offline
        Ray Cassick
        wrote on last edited by
        #3

        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."


        1 Reply Last reply
        0
        • R Ray Cassick

          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."


          Richard DeemingR Offline
          Richard DeemingR Offline
          Richard Deeming
          wrote on last edited by
          #4

          That only applies to the Collection class in the Microsoft.VisualBasic namespace, and is there for backwards compatability with VB6. If you use one of the classes from the System.Collections or System.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

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          1 Reply Last reply
          0
          • C Christian Graus

            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

            N Offline
            N Offline
            Nick Parker
            wrote on last edited by
            #5

            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

            C 1 Reply Last reply
            0
            • N Nick Parker

              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

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              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

              N 1 Reply Last reply
              0
              • C Christian Graus

                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

                N Offline
                N Offline
                Nick Parker
                wrote on last edited by
                #7

                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

                C 1 Reply Last reply
                0
                • N Nick Parker

                  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

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups