How to get Saturday's and Sunday's of whole year

Hi,

FYI, another solution:

arrayDateTime = Enumerable.Range(0,365-CInt(DateTime.IsLeapYear(Today.Year))).Select(Function(i) New DateTime(Today.Year,1,1).AddDays(i)).Where(Function(d) d.DayOfWeek=DayOfWeek.Sunday OrElse d.DayOfWeek=DayOfWeek.Saturday).ToArray()

Regards,

3 Likes