c# Add to elements of a string array

  • Thread starter Thread starter Colin Williams
  • Start date Start date
C

Colin Williams

Hi
I have a file list box with which i am passing the selected items to a
string array (using copyTo), however i also need to pass the path of
the FLB with each string in the array. Is it possible to add this to
each element of the array or is there another approach i could take.

Thanks


Colin Williams
 
btw
Here is the code so far.

int iCount = 0;

iCount = flbsource.SelectedItems.Count;
string spath = flbsource.Path + "\\";

String[] source = new String[iCount];

flbsource.SelectedItems.CopyTo(source, 0);
 
Colin Williams said:
Hi
I have a file list box with which i am passing the selected items to a
string array (using copyTo), however i also need to pass the path of
the FLB with each string in the array. Is it possible to add this to
each element of the array or is there another approach i could take.

Why don't you add the Items manually to the array (btw: why don't you take
an ArrayList?)?
E.g. with foreach..
 
Back
Top