The DateTime.Now property is mutable, which means that it can definitely vary between uses. But the variable that you assigned is not mutable.
So, this should always lead to the fact that the result is correct:
DateTime d = DateTime.Now; bool result = d == d;
It assigns the value returned by DateTime.Now to d, not the property itself. So d will always be equal to d in this code.
But this will not always result in a true result:
bool result = DateTime.Now == DateTime.Now;
source share