(ignoring the optimized compiler flag )
can it be that this code will enter the block on some systems ?
if (Datetime.Now!=Datetime.Now)
{
...
}
I mean , how does it evaluate the values here ? (is it by order) ?
Is there any situations where the condition might be true ?
again , ignore the optimized flag.
DateTime.Nowcalls internally :which calls internally:
where GetSystemTimeAsFile is WindowsAPI function that return system clock information. The accurasy depends on system, so.
If you have a delay, for some reason between different gets (
DateTime.Now) it may produce different enough result that equality comparer fails. But I, personally, never met this kind of condition in my experience.