I am trying to do a notification whenever it is the 1st day of every month but I am having errors at the current moment.
The error I face is that every last day of the same month it keeps stating that is is a new month which is not the result I am expecting
I will put my code here
DateTime firstDayOfnextMonth = new DateTime(
DateTime.Today.Year,
DateTime.Today.Month,
DateTime.DaysInMonth(DateTime.Today.Year, DateTime.Today.Month));
if (DateTime.Today == firstDayOfnextMonth)
{
MessageBox.Show("Its a new month");
}
else
{
MessageBox.Show("Its old month");
}