代码检查:移除冗余的模式匹配括号
如果括号不会影响模式的含义,则此检查会报告其存在。 移除它们可以让模式更易读。
示例
bool matches = value is 1 or ((X and { Foo: "aaa" }));
bool matches = value is 1 or (X and { Foo: "aaa" });
快速修复
快速修复会移除冗余的括号。
2026年 5月 8日