public struct Date { private int _year; private int _day; private int _month; public Date(int year, int day, Month month) { this._year = year; this._day = day; this._month = (int)month; } public override string ToString() { return _month + "-" + _day + "-" + _year; } } public enum Month { Jan, Feb ,March , April , May ,June, July ,Aug ,Sep,Oct, Nov,Dec }
Abhishek KumarPosted May 10, 2014, 4:29 AM
Please find the Assigment 2 with source code.
Palle TechnologiesPosted May 8, 2014, 7:38 AM
public struct Date
{
private int _year;
private int _day;
private int _month;
public Date(int year, int day, Month month)
{
this._year = year;
this._day = day;
this._month = (int)month;
}
public override string ToString()
{
return _month + "-" + _day + "-" + _year;
}
}
public enum Month
{
Jan, Feb ,March , April , May ,June, July ,Aug ,Sep,Oct, Nov,Dec
}