1
Answer

merging string [] in foreach loop

Ask a question
string[] drives = Directory.GetLogicalDrives();
foreach (string d in drives)
{
string[] d1 = Directory.GetDirectories(d);
string[] pathlist = fde.Union(falaa).Union(d1).ToArray(); 
}
 
//fde is the nother path list 
//falaa is the nother path list  
* pathlist is the collection of all lists
 
in path list i am not able to store the list, i know very well it is a mistake in code?

Answers (1)