Results 1 to 3 of 3

Thread: Confusion regarding array in .NET

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    US of A
    Posts
    2

    Confusion regarding array in .NET

    I read one article in Vb world by Karl moore saying that in .NET array ia a zero based object and if an array is define as myArray(10) then myArray will have total 11 elements starting from 0 till 10.

    While in one another I read that the same kind of example will have 10 elements starting from 0 till 9.


    I don't have .Net installed in my machine. Could someone will confirm what's the right answer regarding arrays.


    Thanks
    Keep Smiling when you do hard work or otherwise

  2. #2
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    In Beta 1 an array declared as myArray(10) would created an array from 0 to 9, but because of complaints from vb programmers this is changed in beta 2 to an array from 0 to 10.
    In C++ or C# it still creates an array from 0 to 9.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    US of A
    Posts
    2
    Thanks Frans.
    Keep Smiling when you do hard work or otherwise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width