Synopsis: | Avoid conditions with double negatives |
Language: | C# |
Severity Level: | 4 |
Category: | Control flow |
Description: |
Although a property like bool hasOrders = !customer.HasNoOrders; Double negatives are more difficult to grasp than simple expressions, and people tend to read over the double negative easily. |
Literature References: |
Aviva AV1502 |