Get Files List using LINQ

By Super Man

How to get a file list using LINQ

var files = from file in new System.IO.DirectoryInfo(@"C:\").GetFiles() select file;

foreach(var i in files)
{
     MessageBox.Show(i.Name);
}

Get Files List using LINQ  (701 Views)