I know how to test an object to see if it is of a type, using the IS keyword e.g.
if (foo is bar) { //do something here }
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.
BTW – I have a horrible feeling this is soooo obvious, so apologies in advance…
1 Answer