PDA

Click to See Complete Forum and Search --> : [RESOLVED] Adding to an array


Arc
Sep 10th, 2007, 11:21 PM
Hey guys.

I have an array that is retrieving a list of files names via a method. This works fine when I call the method the first time, yet when I call it the second time the first files seem to be removed. I thought it would just append the new file names to the end of the array.

Here is the code

string[] theFiles = new string[] { };
theFiles = GetFilesAfterDate(path1, scan);
theFiles = GetFilesAfterDate(path2, scan);


shouldnt it just append the file names on to the end of the array when it is called the second time?

Thanks!:wave:

nemaroller
Sep 11th, 2007, 05:51 AM
By the resolved title, I'm guessomg that morning cup of coffee finally kicked in...

carstenht
Sep 18th, 2007, 09:53 AM
There is also the possibility of using an ArrayList.