473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.Directory.GetFiles(source)
I get an error.

Thanks
Dec 15 '06 #1
3 1206
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" <jo************@skynet.beschreef in bericht
news:uM**************@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


Dec 15 '06 #2
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]" <no************@planet.nlschreef in bericht
news:uW**************@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" <jo************@skynet.beschreef in bericht
news:uM**************@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



Dec 15 '06 #3
<variable>.AddRange(System.IO.Directory.GetFiles(s ource))
"Joris De Groote" <jo************@skynet.bewrote in message
news:OB**************@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]" <no************@planet.nlschreef in bericht
news:uW**************@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" <jo************@skynet.beschreef in bericht
news:uM**************@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




Dec 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Hall | last post by:
Folks, My secnario involves two tables - ObservationRegister, and Person. ObservationRegister contains most of the "useful" fields, including the UserID of the person that raised the record, and...
6
by: cipher | last post by:
I have some constant values in my web service that my client application will require. Having to keep server side and client side definitions insync is tedious. I am trying to do something like...
2
by: Hennie | last post by:
I apologise if this is a stupid question, but I would appreciated any help on this subject. I want to create a view (VIEW_1 in example below) where I take numeric values from a field in one...
13
by: Gregor =?UTF-8?B?S292YcSN?= | last post by:
Hi! With VALUES you can do something like: SELECT * FROM (VALUES ('A', 1), ('B', 2), ('C', 2)) AS TEMP(LETTER, NUMBER) which will give you: LETTER NUMBER ------ ------ A 1 B 2...
8
by: gigonomics | last post by:
Hi all, I hope someone can help me out. I need to return the best available seats subject to the constraint that the seats are side by side (or return X consecutive records from a table column...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.