Home All Groups Group Topic Archive Search About

c# Add to elements of a string array

Author
19 Oct 2006 7:47 PM
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

Author
19 Oct 2006 8:35 PM
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);
Author
20 Oct 2006 8:14 AM
Jens Weibler
"Colin Williams" <colinwilliams***@msn.com> wrote...
> 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..

--
Jens

AddThis Social Bookmark Button