using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Date { class Date { // Properties public int Year { get; set; } public string Month { get; set; } public int Day { get; set; } // Constructer public Date(int intYear, string strMonth, int intDay) { Year = intYear; Month = strMonth; Day = intDay; } // Overloaded Constructer public Date(string strMonth, int intDay) { Year = DateTime.Now.Year; Month = strMonth; Day = intDay; } // A method to display the date public void DisplayDate() { Console.WriteLine(String.Format("The Date is: {0} {1} {2}", Day.ToString(), Month, Year.ToString())); } // A method to return the date public string GetDate(ref int intDay, ref string strMonth, ref int intYear) { Day = intDay; Month = strMonth; Year = intYear; return (String.Format("The Date is: {0} {1} {2}", intDay.ToString(), strMonth, intYear.ToString())); } } }