NDepend Users Voice

If Statements Counted as Local Variables?

Is NDepend counting if statements as local variables? The number of local variables reported by NDepend is often much higher than what I manually count. In some cases NDepend is reporting 10+ more local variables in addition to the number that are actually declared.

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    James shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • AdminPatrick Smacchia (Senior Software Engineer, NDepend) commented  · 

        This is a problem we are actually fixing. This is mainly because for now we also count the local variable of method generated by the compiler when you have a lambda that capture states (which increase a lot the # variables).

      Feedback and Knowledge Base