CSharp examples for System:DateTime Day
Each Day from a range
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;//from w w w. ja v a 2 s. c om public class Main{ public static IEnumerable<DateTime> EachDay(DateTime from, DateTime thru) { for (var day = from.Date; day.Date <= thru.Date; day = day.AddDays(1)) yield return day; } }