Open sandboxFocus

Struct StatementsCount

A metric that counts the number of statements in a declaration.

Namespace: Metalama.Extensions.Metrics
Assembly: Metalama.Extensions.Metrics.dll
Syntax
public struct StatementsCount : IMetric<IMethodBase>, IMetric<INamedType>, IMetric<INamespace>, IMetric<ICompilation>, IMetric
Remarks

Counting statements is more relevant than counting lines of code. However, modern C# is more expression-oriented than earlier versions of the language. Counting expression nodes has become a more relevant metric.

Properties

Name Description
Value

Gets the total number of statements.

Methods

Name Description
ToString()