In the September ‘09 issue of MSDN  magazine, Justin Van Patten discusses the new enumerable file and directory API's in .NET 4.0. This has really been a problem when you have a large number of files or folders and loading them all into an array at once is dumb idea. This has made some of us resort to implementing our own enumerable implementations with the FindFirst and FindNext Win32 API calls. The new API's return an IEnumerable or IEnumerable<*Info> so that you can work with one item at a time. This also fits in very nicely with Linq. Anyways, here are the new API's:

System.IO.Directory.EnumerateDirectories
System.IO.Directory.EnumerateFiles
System.IO.Directory.EnumerateFileSystemEntries
System.IO.DirectoryInfo.EnumerateDirectories
System.IO.DirectoryInfo.EnumerateFiles
System.IO.DirectoryInfo.EnumerateFileSystemInfos