i've put this code in a class of my project in VS2013 .NET Framework 4.0
static List<string> f = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + "imgdir\\").EnumerateFiles("*.*", SearchOption.AllDirectories).Select(x=>x.FullName).ToList();
is very very slow in debug mode (100'000 file > 3 minutes). if i run without debug is very fast (<5 seconds).