array of days of the months
static int[] MonthDays = new int[12] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static void Main(string[] args) { Console.WriteLine(GetDaysOfMonth(3)); } static int GetDaysOfMonth(int Month) { return MonthDays[Month]; }