I noticed that Resharper suggests that I turn this:
if (myObj.myProp is MyType) { ... }
into this:
var myObjRef = myObj.
It should be suggesting a second change as well:
(MyType)myObj.myProp
into
myObjRef
This saves a property access and a cast, compared to the original code. But it's only possible after changing is to as.
is
as