Is there a reason why we would use Directory.GetFiles() over Directory.EnumerateFiles()?
c#, system.io.directory
Solution
According to http://msdn.microsoft.com/en-us/library/07wt70x2%28v=vs.110%29.aspx:
The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.
I guess `GetFiles` could be considered as a convenience function.
Problem
I am not sure why we would use `Directory.GetFiles` for if `Directory.EnumerateFiles` would be able to do the same thing and you would be able to enumerate the list even before the whole list of directories found is returned. What is the difference between Directory.EnumerateFiles vs Directory.GetFiles? Why, now that `EnumerateFiles` is available would there be a need to use `GetFiles`?