Here is a sample code:
static DateTime time; if (time == null) { }
Since DateTime cannot be null, why is this code compiling?
Edit: The problem is not only that this code will always return false, but for some reason like DateTime , which is never null, is allowed with this comparison.
Rinus source share