List All files in a Directory using LINQ
expr=System.IO.Directory.EnumerateFiles("C:\\");
foreach (String file in expr)
{
Console.WriteLine(file);
}
expr=System.IO.Directory.EnumerateFiles("C:\\");
foreach (String file in expr)
{
Console.WriteLine(file);
}
It displays complete path+filename.
No comments:
Post a Comment