The MSDN documentation for the is keyword says:
expression is not null
Why? If MethodThatReturnsNull() is type were called shouldn't that return false since null certainly isn't that type?
It does return false
if expression
is null
. Perhaps you're misunderstanding the documentation?