fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. DateTime dt1 = new DateTime(2000,1,2,12,00,00);
  9. DateTime dt2 = new DateTime(2000,1,3,03,00,00);
  10.  
  11. TimeSpan duration = dt2.Date - dt1.Date;
  12. int days = duration.Days + 1;
  13.  
  14. Console.WriteLine(days);
  15. }
  16. }
Success #stdin #stdout 0.03s 33904KB
stdin
Standard input is empty
stdout
2