Since DateTime.AddDays() takes a double
parameter, I'm concerned that when you add a days, there might be some rounding errors. For example let's say I have the following loop:
DateTime Now = DateTime.Today;
for (int i = 0; i < 365; ++i)
{
Now = Now.AddDays(1);
// do something
}
I'm concerned that Now might start drifting away from midnight. I'm always tempted to do something like this which may be a little slower, but relieves my paranoia:
for (int i = 0; i < 365; ++i)
{
Now = Now.AddDays(1.01).Date;
// do something
}