Add values in 1-dimensional array

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joris De Groote

    #1

    Add values in 1-dimensional array

    Hi,

    I have an array called files() (String). There are a couple of values in
    there. I want to add more values in that array.
    How can I do this? When I try files += System.IO.Direc tory.GetFiles(s ource)
    I get an error.

    Thanks


  • Cor Ligthert [MVP]

    #2
    Re: Add values in 1-dimensional array

    Joris,

    Do never more us a fixed array if it is not fixed.

    There are so many better solutions, that this message would probably not be
    accepted by skynet if I was typing them all.

    However take my advice and start with looking at the arraylist or/and the
    generic list.

    Cor

    "Joris De Groote" <joris.degroote @skynet.beschre ef in bericht
    news:uMczu8FIHH A.3952@TK2MSFTN GP02.phx.gbl...
    Hi,
    >
    I have an array called files() (String). There are a couple of values in
    there. I want to add more values in that array.
    How can I do this? When I try files +=
    System.IO.Direc tory.GetFiles(s ource) I get an error.
    >
    Thanks
    >
    >

    Comment

    • Joris De Groote

      #3
      Re: Add values in 1-dimensional array

      Hey

      Yeah, I know arraylists :). Anyway, I have now used an arraylist for this
      thing. Now I have created this with some workarounds :).
      How can you get System.IO.Direc tory.GetFiles(s ource) in an arraylist in one
      time? So that the values are in the arraylist? I can only put data in
      arraylists one by one.

      Thanks
      Joris


      "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschre ef in bericht
      news:uWCnyXIIHH A.3872@TK2MSFTN GP06.phx.gbl...
      Joris,
      >
      Do never more us a fixed array if it is not fixed.
      >
      There are so many better solutions, that this message would probably not
      be accepted by skynet if I was typing them all.
      >
      However take my advice and start with looking at the arraylist or/and the
      generic list.
      >
      Cor
      >
      "Joris De Groote" <joris.degroote @skynet.beschre ef in bericht
      news:uMczu8FIHH A.3952@TK2MSFTN GP02.phx.gbl...
      >Hi,
      >>
      >I have an array called files() (String). There are a couple of values in
      >there. I want to add more values in that array.
      >How can I do this? When I try files +=
      >System.IO.Dire ctory.GetFiles( source) I get an error.
      >>
      >Thanks
      >>
      >>
      >
      >

      Comment

      • Stephany Young

        #4
        Re: Add values in 1-dimensional array

        <variable>.AddR ange(System.IO. Directory.GetFi les(source))


        "Joris De Groote" <joris.degroote @skynet.bewrote in message
        news:OBquIwIIHH A.5104@TK2MSFTN GP06.phx.gbl...
        Hey
        >
        Yeah, I know arraylists :). Anyway, I have now used an arraylist for this
        thing. Now I have created this with some workarounds :).
        How can you get System.IO.Direc tory.GetFiles(s ource) in an arraylist in
        one time? So that the values are in the arraylist? I can only put data in
        arraylists one by one.
        >
        Thanks
        Joris
        >
        >
        "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschre ef in bericht
        news:uWCnyXIIHH A.3872@TK2MSFTN GP06.phx.gbl...
        >Joris,
        >>
        >Do never more us a fixed array if it is not fixed.
        >>
        >There are so many better solutions, that this message would probably not
        >be accepted by skynet if I was typing them all.
        >>
        >However take my advice and start with looking at the arraylist or/and the
        >generic list.
        >>
        >Cor
        >>
        >"Joris De Groote" <joris.degroote @skynet.beschre ef in bericht
        >news:uMczu8FIH HA.3952@TK2MSFT NGP02.phx.gbl.. .
        >>Hi,
        >>>
        >>I have an array called files() (String). There are a couple of values in
        >>there. I want to add more values in that array.
        >>How can I do this? When I try files +=
        >>System.IO.Dir ectory.GetFiles (source) I get an error.
        >>>
        >>Thanks
        >>>
        >>>
        >>
        >>
        >
        >

        Comment

        Working...