Order files by Creation Time

  • Thread starter Thread starter Reason101
  • Start date Start date
R

Reason101

Guest
Hi, please advise how to modify this code to get files, Order by Creation Time.

Latest should be received in Order. I tried below code

var files = Directory.EnumerateFiles(sPath, "*.pdf")
.OrderBy(f => f)
.Take(NumberOfFiles);
string[] xyz = files.ToArray();




Reason101

Continue reading...
 
Back
Top