public DateTime GetLastDayOfMonth(int year, int month)
{
month += 1;
if (month>12)
{
month = 1;
}
return new DateTime(year, month, 1).AddDays(-1);
}
solved C# DateTime The last 1 days of each month [closed]
public DateTime GetLastDayOfMonth(int year, int month)
{
month += 1;
if (month>12)
{
month = 1;
}
return new DateTime(year, month, 1).AddDays(-1);
}
solved C# DateTime The last 1 days of each month [closed]