Pure
attribute should return a value CS-R1002A method with the Pure
attribute suggests that it does not have any side effects, i.e., does not mutate the object's state. Therefore, having such a method have a return type void
does not make any sense. Therefore, it is suggested that you refactor your code accordingly, i.e., drop the said attribute or modify your method's logic.
[Pure]
public void CalculateMetrics()
{
// ...
}
public void CalculateMetrics()
{
// ...
}