- DaysInMonth(int year, int month)
- using System;
- namespace forgetCode
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter year");
- int year = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Enter month");
- int month = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Days in the month:"+DateTime.DaysInMonth(year,month));
- }
- }
- }