I have a base class like this:
public class Trajectory{
public int Count { get; set; }
public double Initial { get; set { Count = 1; } }
public double Current { get; set { Count ++ ; } }
}
So, I have code in the base class, which makes the set-s virtual, but the get-s must stay abstract. So I need something like this:
...
public double Initial { abstract get; virtual set { Count = 1; } }
...
But this code gives an error. The whole point is to implement the counter functionality in the base class instead in all the derived classes. So, how can I make the get and set of a property with different modifiers?