You can use this constructorDateTime , for example:
DateTime tomorrow = new DateTime(DateTime.Now.Year,
DateTime.Now.Month,
DateTime.Now.Day + 1,
9,
0,
0);
Console.WriteLine(tomorrow);
The output will be:
18.03.2014 09:00:00
As CompuChip is mentioned, this throws an exception if the current day is the last day of the month.
You can better use the DateTime.Todayproperty with AddDays(1)and AddHours(9), because it reaches midnight of the current day. How;
DateTime tomorrow = DateTime.Today.AddDays(1).AddHours(9);
source
share