static void Main(string[] args) { Console.WriteLine("Enter year"); DateTime x = DateTime.Parse(Console.ReadLine()); Year.CheckYear(x); Console.ReadKey(); }