Total .NET Analyzer Rule Documentation  

Nesting Rule

Avoid deeply nested If statements.

Remarks

Deeply nested If statements are hard to understand, debug, and maintain. In order to keep code manageable, you should keep nesting to a minimum (generally 3 levels of nesting or fewer).

Total .NET Analyzer identifies nesting that exceeds the depth defined in the Rule Editor. The default maximum depth for nesting is 3, but you can change this number as desired.

Resolution

Revise the code to reduce the level of nesting. Consider breaking linear nested code into into several smaller members.

See Also