<p>I know how to test an object to see if it is of a type, using the IS keyword e.g.</p>

<pre><code>if (foo is bar)
{
  //do something here
}
</code></pre>

<p>but how do you test for it not being "bar"?, I can't seem to find a keyword that works with IS to test for a negative result. </p>

<p>BTW  - I have a horrible feeling this is soooo obvious, so apologies in advance...</p>

```
```
if (!(foo is bar)) {
}
```
```