Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 642513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:10:48+00:00 2026-05-13T21:10:48+00:00

I was looking at some code length metrics other than Lines of Code. Something

  • 0

I was looking at some code length metrics other than Lines of Code. Something that Source Monitor reports is statements. This seemed like a valuable thing to know, but the way Source Monitor counted some things seemed unintuitive. For example, a for statement is one statement, even though it contains a variable definition, a condition, and an increment statement. And if a method call is nested in an argument list to another method, the whole thing is considered one statement.

Is there a standard way that statements are counted and are their rules governing such a thing?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:10:49+00:00Added an answer on May 13, 2026 at 9:10 pm

    The closest you might get to a formal definition of “what is a statement” would be the C# specification itself. Good luck working out whether a particular tool’s measurement agrees with your reading of the specification.

    Given that metrics are best used as a guide to better/worse code, and not a strict formula, does the exact definition used by the tool make much difference?

    If I have three methods, with “statement lengths” of 2500, 1500 and 150, I know which method I’ll be examining first; that another tool might report 2480, 1620 and 174 isn’t too important.

    One of the best tools I’ve seen for measuring metrics is NDepend, though again I’m not 100% sure what definitions it is using. According to the website, NDepend has 82 separate metrics, including Number of instructions and Cyclomatic Complexity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 502k
  • Answers 502k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I dare say there are some edge cases where it… May 16, 2026 at 2:35 pm
  • Editorial Team
    Editorial Team added an answer Ummm... what's wrong with string optionalParm = "" again? Why… May 16, 2026 at 2:35 pm
  • Editorial Team
    Editorial Team added an answer You could use HTML Tidy from within PHP to clean… May 16, 2026 at 2:35 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm looking through some code for learning purposes. I'm working through this portion of
I am looking at some existing code in a web application. I saw this:
I have some code that is looking up group memberships from local groups on
I was looking through some code on a project of mine and thinking about
I was looking at some code from a tutorial for creating a carousel menu
I'm looking to convert some C# code to the equivalent in Java. The C#
I'm looking to patch a piece of abandonware with some code. The software is
I'm writing some code (Python, but really isn't important) that analyzes strings inside PE
In looking at some code reflected from the WCF libraries, I'm seeing a pattern
I'm trying to write some code to extract Exif information from a JPG. Exif

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.