G
Guest
I have a function that returns array, i want to call this function inside a
for loop as shown below.. the problem i have i i always get the result for
the .gif as it is the last entry in ext array. how do i combine the results
and maybe use a seperator in between each results? many thanks
string[] ext = new string[3];
ext[0] = "*.mp3";
ext[1] = "*.bmn";
ext[2] = "*.gif";
string[] strCol = new string[3];
for(int x = 0; x < ext.Length; x++)
{
strCol = DirSearch("C:\\TEMP",ext[x]);
}
DataGrid1.DataSource = strCol;
DataGrid1.DataBind();
for loop as shown below.. the problem i have i i always get the result for
the .gif as it is the last entry in ext array. how do i combine the results
and maybe use a seperator in between each results? many thanks
string[] ext = new string[3];
ext[0] = "*.mp3";
ext[1] = "*.bmn";
ext[2] = "*.gif";
string[] strCol = new string[3];
for(int x = 0; x < ext.Length; x++)
{
strCol = DirSearch("C:\\TEMP",ext[x]);
}
DataGrid1.DataSource = strCol;
DataGrid1.DataBind();