Dynamic array ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thomas

    #1

    Dynamic array ?

    Hi

    I'm writing a program in Visual basic (Visual studio beta 2005)
    In this array I need to somthing like

    array(0) = 0
    array(1) = 1
    array(2) = 2
    array(3) = 3

    i then delete array(2) = 2

    the array must then resize to

    array(0) = 0
    array(1) = 1
    array(2) = 3

    How can I do this ?

    --
    thomas
  • B

    #2
    Re: Dynamic array ?

    thomas schreef:[color=blue]
    > Hi
    >
    > I'm writing a program in Visual basic (Visual studio beta 2005)
    > In this array I need to somthing like
    >
    > array(0) = 0
    > array(1) = 1
    > array(2) = 2
    > array(3) = 3
    >
    > i then delete array(2) = 2
    >
    > the array must then resize to
    >
    > array(0) = 0
    > array(1) = 1
    > array(2) = 3
    >
    > How can I do this ?
    >
    > --
    > thomas[/color]

    So the next step is

    array(2) = array(3)

    the resize it. In VB 6 this is

    Redim preserve array(0 to 2)

    the preserve statement will keep the existing values.

    B.

    Comment

    • thomas

      #3
      Re: Dynamic array ?

      B wrote:[color=blue]
      > thomas schreef:
      >[color=green]
      >> Hi
      >>
      >> I'm writing a program in Visual basic (Visual studio beta 2005)
      >> In this array I need to somthing like
      >>
      >> array(0) = 0
      >> array(1) = 1
      >> array(2) = 2
      >> array(3) = 3
      >>
      >> i then delete array(2) = 2
      >>
      >> the array must then resize to
      >>
      >> array(0) = 0
      >> array(1) = 1
      >> array(2) = 3
      >>
      >> How can I do this ?
      >>
      >> --
      >> thomas[/color]
      >
      >
      > So the next step is
      >
      > array(2) = array(3)
      >
      > the resize it. In VB 6 this is
      >
      > Redim preserve array(0 to 2)
      >
      > the preserve statement will keep the existing values.
      >
      > B.[/color]

      Thanks

      Comment

      Working...