C#

C#

Made by DeepSource

Convert complex expression to compound assignment CS-R1100

Anti-pattern
Minor
Autofix

Languages such as C# allow you to combine 2 operators such as + and = as "+=" to denote "add" and "assignment" operations. This is called compound assignment. Consider refactoring your expressions and turning them into compound assignments.

Bad Practice

i = i + 4;

Recommended

i += 4;