When a field is accessed to get a value for which get and set are specified, multiple accesses are made to this field, which results in a StackOverflowException . If we make the field available, i.e. public , the problem disappears.
class Sphere : Figure { public int radius { get { return radius; } private set { radius = value; } } //неважный код public Sphere(int r, double d) : base(d) { this.radius = r; } }
public SomeType SomeName{get;set;}- user227049