I have a problem with an accessor inherited, I can't define the set method.
My code :
public abstract class MotherOfDragons
{
public abstract String DragonsName { get; }
}
the classes inherited :
public class Drogon : MotherOfDragons
{
public override String DragonsName { get; set; }
}
public class Viserion : MotherOfDragons
{
public override String DragonsName { get; }
}
It's works goo for Viserion
but Drogon
I have the error CS0546
'accessor' : cannot override because 'property' does not have an overridable set accessor
It is possible solve this error without add set accessor in class MotherOfDragons
? I want to keep this field read only expect for one case.
Thank you