Results 1 to 4 of 4

Thread: [RESOLVED] [2005] add to an existing array?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Resolved [RESOLVED] [2005] add to an existing array?

    well i was wondering wat the fastest way to do this was? also how long can arrays be before u get an overflow error?

  2. #2
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: [2005] add to an existing array?

    Use the static Array.Resize method.
    But you also may want to check out the generic System.Collections.Generic.List(Of T). This is designed to grow and shrink efficiently (similar to ArrayList, but generic).
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: [2005] add to an existing array?

    Quote Originally Posted by David Anton
    Use the static Array.Resize method.
    But you also may want to check out the generic System.Collections.Generic.List(Of T). This is designed to grow and shrink efficiently (similar to ArrayList, but generic).
    would


    redim preserve arrayy(arrayy.length)

    also work for adding another space?

  4. #4
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: [2005] add to an existing array?

    Of course - d'oh!

    I'm so used to working in multiple languages that I overlooked that VB option.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

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