Here is the code snippet to get all the file information from a folder in the descending order of creation date and time.
var dirInfo = new DirectoryInfo(folderNametoSearch);
FileInfo[] filesInfo = dirInfo.GetFiles().OrderByDescending(p => p.CreationTime).ToArray();
No comments:
Post a Comment