I am using Directory.GetFiles to get files from a particular folder. By default files from that folder are coming sort by filename ie. in alphabetical order of filename. I want to get files in the order in which files are modified.
I cannot use Directory.GetInfo as I want to get the files which contain particular keyword. Please let me know how can we get the file sorted by their modified date. I am using the following code
string[] arr1 = Directory.GetFiles("D:/TestFolder", "*"Test12"*");
Any help would be greatly appreciated.