Resharper は、次のコードについて、「式が常に false である」ため、最後の null チェックが冗長であると不満を述べています。
ICloneable data = item as ICloneable;
if (data == null)
throw new InvalidCastException("blah blah, some error message");
object copy = data.Clone();
if (copy == null) // <-- this is where it complains.
return default(T);
null にならないことをどのようにして知るのでしょうか?