Gendarme.Rules.Performance.AvoidLargeNumberOfLocalVariablesRule Class
This rule warns when the number of local variables exceed a maximum value (default is 64). Having a large amount of local variables makes it hard to generate code that performs well and, likely, makes the code harder to understand.

See Also: AvoidLargeNumberOfLocalVariablesRule Members

Syntax

[Gendarme.Framework.FxCopCompatibility("Microsoft.Performance", "CA1809:AvoidExcessiveLocals")]
[Gendarme.Framework.Problem("The number of local variables is so large that the JIT will be unable to properly allocate registers.")]
[Gendarme.Framework.Solution("Refactor your code to reduce the number of variables or split the method into several methods.")]
public class AvoidLargeNumberOfLocalVariablesRule : Gendarme.Framework.Rule, Gendarme.Framework.IMethodRule

Remarks

This rule is available since Gendarme 2.0

Requirements

Namespace: Gendarme.Rules.Performance
Assembly: Gendarme.Rules.Performance (in Gendarme.Rules.Performance.dll)
Assembly Versions: 2.8.0.0