Click here to Skip to main content
15,910,234 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
var Files = Directory.GetFiles(SourcePath).Select(x => new FileInfo(x)).OrderByDescending(x => x.LastAccessTime).Take(20).ToArray();


here i am getting last accessed 20 files,


but i wanted file before 20 days, there might be 100 files before 20 days i should get tht 100 files , pls help me with this using linq
Posted

1 solution

use 'Skip(20)' instead of 'Take(20)'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900