I am just wondering if there is a simple way or framework to to get all weekends within date range in C#?
Is it possible to do with LINQ as well?
Any clue?
Thank you!
I am just wondering if there is a simple way or framework to to get all weekends within date range in C#?
Is it possible to do with LINQ as well?
Any clue?
Thank you!
That's not really difficult to code... Here's an efficient iterator:
If you make a way to enumerate all days, you can use linq to filter to weekends:
I found how to do it.
http://www.dotnetjalps.com/2011/06/finding-saturdaysunday-between-date.html