|
|
|
|
|
by clusmore
3535 days ago
|
|
I agree that setter properties are often a code smell, but getter properties are nice for calculated fields. As a very simple example, consider the following (C#): class Circle
{
public Circle(int radius) { Radius = radius; }
public int Radius { get; }
public int Diameter => Radius * 2;
}
|
|