How to read file name with dll
extension from a directory and from its subfolders recursively using LINQ or LAMBDA expression.
Now i\'m using Nested for
this returns just file names+extensions:
DirectoryInfo di = new DirectoryInfo(@"d:\somewhere\");
var q = from i in di.GetFiles("*.dll", SearchOption.AllDirectories)
select i.Name;
this returns just file names without extensions:
DirectoryInfo di = new DirectoryInfo(@"d:\somewhere\");
var q = from i in di.GetFiles("*.dll", SearchOption.AllDirectories)
select System.IO.Path.GetFileNameWithoutExtension(i.Name);