how get yesterday and tomorrow datetime in c#
Solution 1:
DateTime tomorrow = DateTime.Today.AddDays(1);
DateTime yesterday = DateTime.Today.AddDays(-1);
Solution 2:
You can find this info right in the API reference.
var today = DateTime.Today;
var tomorrow = today.AddDays(1);
var yesterday = today.AddDays(-1);