代码检查:简化取反模式。
该检查会报告对已取反模式再次取反的情况。 这样会导致代码更难阅读,但不会改变结果。
示例
if (o is not not string)
{
}
if (o is string)
{
}
快速修复
请从模式中去除双重取反。
2026年 5月 8日