Results 1 to 4 of 4

Thread: Arrays :(

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    Arrays :(

    hi,
    i want an array , i dont know how many objects are going to be added to it before the function call, so is there anyway to

    * increase the upperbound, then add the new object?
    or
    * i know i'm not going to have more than 20 objects, so can intsiate it with 20 objects, then remove the extra one ( empty values) at the end?

    what i finally want is a full array, no empty values


    thanks...

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you can use the ArrayList rather than making a string type of array, eg:
    VB Code:
    1. Dim myArray As New ArrayList() '/// you can also specify a capacity in the brackets.
    2.         myArray.Add("an item added to the arraylist")
    3.         MessageBox.Show("the array now holds: " & myArray.Count)
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I agree with dynamic_sysop and if you need a type safe array from the arraylist you can use the ToArray method to get one.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    thanks ....

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