class test
{
static void main()
{
LoopDir("c:\");
}
public static void LoopDir(String dir)
{
foreach (var file in Directory.GetFiles(dir))
{
Console.WriteLine(file);
}
foreach (var subDir in Directory.GetDirectories(dir))
{
LoopDir(subDir);
}
}
}