Manipulating arrays

Discussion in 'Questions (Windows Mobile)' started by Mr_Gee, Nov 21, 2008.

  1. Mr_Gee

    Mr_Gee Active Member Licensed User

    Arrays are and can be very helpful.
    I’d like to know how I can remove a value form the array e.g.
    Lets say I have an Array : Array(0,1,2,3,4,5,6,7)
    And I want to remove the 4,
    is that something I can do directly in the Array or do I need to copy the data into a 2nd array omitting the 4 ?
    Also clearing the information in the Array, is there someway that the Array will be empty ?

    Thanks guys
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can't remove an item in the middle of the array.
    I recommend you to switch to ArrayList which can do all that and more.
     
  3. Mr_Gee

    Mr_Gee Active Member Licensed User

    I'll do that then for the removing thing,
    What about clearing an Array?
    Is that possible

    Thanks
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can redeclare an array in order to clear it.
     
  5. Mr_Gee

    Mr_Gee Active Member Licensed User

    great, thanks again
     
  6. agraham

    agraham Expert Licensed User

  7. Mr_Gee

    Mr_Gee Active Member Licensed User

    Cool, thanks i'll play around it

    :sign0188:
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice