All rules
IDE0074Language rules (expression-level preferences)
Use coalesce compound assignment
Use coalesce compound assignment
Microsoft docs Documented together with IDE0054Use coalesce compound assignment
Description
These rules concern the use of compound assignment. IDE0074 is reported for coalesce compound assignments and IDE0054 is reported for other compound assignments.
Example
// dotnet_style_prefer_compound_assignment = true
x += 5;
// dotnet_style_prefer_compound_assignment = false
x = x + 5;Configurable options
Vote for the value each option should take in the generated .editorconfig.
dotnet_style_prefer_compound_assignment default:
trueYour vote
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0