Need to search the directory/sub-directories to find a file, would prefer it to stop once it has found one.
Is this a feature built into DirectoryInfo.GetFiles that I am missing, or should I be using something else (self-implemented recursive search)?
 
                        
Use
DirectoryInfo.EnumerateFiles()instead which is lazily returning the files (as opposed toGetFileswhich is bringing the full file list into memory first) - you can addFirstOrDefault()to achieve what you want:From MSDN:
(
DirectoryInfo.EnumerateFilesrequires .NET 4.0)