I have been trying to write this loop and it just keeps getting more complicated. Basically I want to take a given date and loop through every month until I reach the curren
DateTime endDate = DateTime.Today; for (DateTime dt = startDate; dt <= endDate; dt = dt.AddMonths(1)) { Console.WriteLine("{0:M/yyyy}", dt); }
But if you prefer while loops, then vote for Dan-o. I did. :)