public static void Searcher (string path, string pattern)
{
var parts = new List<DirectoryInfo> { };
var pathh= new List<string>();
DirectoryInfo dir = new DirectoryInfo(path);
try
{
DirectoryInfo[] dirs = dir.GetDirectories();
foreach (DirectoryInfo di in dirs)
{
parts.Add(di);
}
}
catch { };
foreach (DirectoryInfo part in parts.ToList())
{
if(part.ToString().Contains(pattern) == true)
{
return part;
}
else
{
parts.Add(part);
Searcher(part.ToString(), pattern);
}
}
return part;
}
public static List<DirectoryInfo>Searcher...