Mira___

проверянная главная

Feb 13th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace MyProgram
  5. {
  6. // public class Circle
  7. // {
  8. // public Circle()
  9. // {
  10. // }
  11. // }
  12. class Program
  13. {
  14.  
  15. static void Main()
  16. {
  17. //ClassDate oneDate = new ClassDate();
  18.  
  19. //oneDate.Date=DateTime.Parse("1998.8.8");
  20. Console.WriteLine("Введите дату");
  21. ClassDate oneDate = new ClassDate(DateTime.Parse(Console.ReadLine()));
  22. Console.WriteLine("Предыдущая дата - {0}", oneDate.PreviousDay());
  23. Console.WriteLine("Следующая дата - {0}", oneDate.NextDay());
  24. Console.WriteLine("Количество дней до следующего месяца - {0}", oneDate.DaysLeft());
  25. Console.WriteLine("Значение поля дата {0}", oneDate.Date);
  26. oneDate.Date = DateTime.Parse("2015.02.28");
  27. Console.WriteLine("Измененное значение поля дата {0}", oneDate.Date);
  28. Console.WriteLine("Високосный год или нет? - {0}", oneDate.IsLeap);
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment