Why does Visual Studio warn about this when using is
on value types, but doesn't when on reference types? Lines 1 and 2 raise the warning, while lines 3 and 4 don't.
if (5 is object)
if (new Point() is object)
if ("12345" is object)
if (new StringBuilder() is object)
Because it was not implemented by Microsoft. But it is e.g. implemented by JetBrains ReSharper.
Visual Studio shows 2 compiler warnings:
ReSharper shows 4 warnings: