What happens with Directory.EnumerateFiles if directory content changes during iteration?
I've read discussions about difference between Directory.EnumerateFiles and Directory.GetFiles(). I understand that internally they both use System.IO.FileSystemEnumerableFactory.CreateFileNameIterator() The difference is that EnumerateFiles might use deferred execution (lazy), while GetFiles() does a ToArray, so the function is already executed. But what happens if files and folders are added to the dictionary during the iteration. Will the iteration only iterate over the items that were present during the EnumerateFiles()? Even worse: what happens if files are removed during iterations: will