fork download
  1. using System;
  2. using System.Globalization;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. DateTime dt1 = new DateTime(2012, 08, 01);
  9. DateTime dt2 = new DateTime(2013, 03, 01);
  10. DateTime dt3 = new DateTime();
  11. for (dt3 = dt1.AddMonths(1); dt3 <= dt2; dt3 = dt3.AddMonths(1))
  12. {
  13. Console.WriteLine(dt3.ToString("MM/yyyy"));
  14. }
  15. }
  16. }
Success #stdin #stdout 0.04s 33920KB
stdin
Standard input is empty
stdout
09/2012
10/2012
11/2012
12/2012
01/2013
02/2013
03/2013