I need two or one (out) C# method that will take any datetime and return the start date of year and end date of year for that year.
Not a homework (;-)
I need two or one (out) C# method that will take any datetime and return the start date of year and end date of year for that year.
Not a homework (;-)
void Dates(DateTime d, out DateTime b, out DateDime e)
{
b = new DateTime(d.Year, 1, 1);
e = new DateTime(d.Year, 12, 31);
}
DateTime startDate = new DateTime(year, 1, 1);
DateTime endDate = new DateTime(year, 12, 31);