除非纯粹的类型检查,否则使用as转换比is快
is and as// is 转换
is and as
object obj = GetReferent();
is and as
if (obj is SomeType)
}

相关文章: