Is there any chance that this statement would return true
DateTime.Now == DateTime.Now
can a very fast machine return true for this statement, I tried on several machines and its always false ?
Yes.
The resolution of this property depends on the system timer, which is approximately 15 milliseconds on Windows systems.As a result, repeated calls to the Now property in a short time interval, such as in a loop, may return the same value.
source: https://msdn.microsoft.com/en-us/library/system.datetime.now(v=vs.110).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With