|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Add values in 1-dimensional arrayHi,
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.Directory.GetFiles(source) I get an error. Thanks 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 Show quoteHide quote "Joris De Groote" <joris.degro***@skynet.be> schreef in bericht news:uMczu8FIHHA.3952@TK2MSFTNGP02.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.Directory.GetFiles(source) I get an error. > > Thanks > > 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.Directory.GetFiles(source) 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 Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht news:uWCnyXIIHHA.3872@TK2MSFTNGP06.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.degro***@skynet.be> schreef in bericht > news:uMczu8FIHHA.3952@TK2MSFTNGP02.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.Directory.GetFiles(source) I get an error. >> >> Thanks >> >> > > <variable>.AddRange(System.IO.Directory.GetFiles(source))
Show quoteHide quote "Joris De Groote" <joris.degro***@skynet.be> wrote in message news:OBquIwIIHHA.5104@TK2MSFTNGP06.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.Directory.GetFiles(source) 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]" <notmyfirstn***@planet.nl> schreef in bericht > news:uWCnyXIIHHA.3872@TK2MSFTNGP06.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.degro***@skynet.be> schreef in bericht >> news:uMczu8FIHHA.3952@TK2MSFTNGP02.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.Directory.GetFiles(source) I get an error. >>> >>> Thanks >>> >>> >> >> > > |
|||||||||||||||||||||||