ReSharper 2026.3 Help

代码检查:添加括号以避免不明显的优先级

在许多情况下,表达式中的括号是可选的。 Sometimes they help you clarify precedence of operations — for example if ((a & b) | c). Sometimes, however, they do not help at all and only add clutter — var d = a + (b + c);. ReSharper will help you define where optional parentheses are helpful to you, and then either clean up the redundant parentheses or automatically add missing ones where necessary.

有关配置和强制执行可选括号偏好的更多信息,请参阅 代码语法样式:可选括号。

2026年 11月 6日