Results 1 to 4 of 4

Thread: LBound function ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    LBound function ?

    Forgive me, I'm .NEW to .NET and totally .LOST

    As I understand the docs, arrays are always 0-based in .NET
    so LBound will always return "0".

    Is this right?
    If so, LBound is a big zero in more ways than 1.

    DaveBo
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Well, i'm too lazy to look up the MSDN docs on Lbound's transistion to .Net, but I will say this....

    You should always make your arrays zero-based anyhow. Then there is no need for a LBound function, because its always zero. Just like a declared integer is always zero by default.

  3. #3
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    the book i read said the Lbound was pointless too... or did it... damn now i'm confused

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    OK OK

    No need to shout.

    I never knew zero could be such a big deal.
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

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