Deane Deane - 4 months ago 13
C# Question

What's the opposite of "is"?

if(myVariable is SomeType)

Out of nothing but curiosity, what's the opposite of that? I want to do something like:

if(!myVariable is SomeType)
if(myVariable is not SomeType)

Neither compile.

Given that "is" is a non-searchable word in most engines, this has been a hard one to find an answer to.


C# : ‘is’ keyword and checking for Not



if (!(myVariable is SomeType))