NDepend.API Documentation
NbVariables Property
NDepend.CodeModel Namespace > IMethod Interface : NbVariables Property
Gets the number of variables declared in the body of this method. Gets null if this methods is abstract or if it is declared in a third-party assembly.
Syntax
Nullable<ushort> NbVariables {get;}
Remarks
Recommendations:
Methods where NbVariables is higher than 8 are hard to understand and maintain.
Methods where NbVariables is higher than 15 are extremely complex and should be split in smaller methods (except if they are automatically generated by a tool).
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IMethod Interface
IMethod Members