first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

LINQ to Objects: Query FileSystemInfo Array as Generic List

using System; using System.Collections.Generic; using System.IO; using System.Linq;

...

DirectoryInfo di = new DirectoryInfo(@"E:\\~shares\\util\\SysinternalsSuite"); List<FileSystemInfo> files = Enumerable.ToList(di.GetFileSystemInfos());

var output = from f in files select f;

Console.WriteLine(output.Count(f => f.FullName.Contains("autoruns")));

mod date: 2009-05-15T00:17:19.000Z