I’m trying to get all the dates of the current month for a calendar game I’m working on. I know how to get the first day of the month already but I’m having trouble figuring out how to get the rest of the dates for c#. Can anyone help me with this please?
If you know the month/year, use:
int numOfDays = DateTime.DaysInMonth(2014, 9);
That will give you the amount of days, 30 in this case. After that constructing each day is just a loop.