MetalamaAPI documentationExtensions APIMetalama.​Extensions.​MetricsStatements­Count
Open sandboxFocus

StatementsCount Class

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

Inheritance
StatementsCount
Namespace: Metalama.Extensions.Metrics
Assembly: Metalama.Extensions.Metrics.dll
Syntax
public sealed class StatementsCount : ValueType, 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()