I have a field in base abstract class. I want to make this field readonly so that its value do not changed after child class has been initialized.
But abstract class cannot have constructor and readonly can only be initialized from constructor.
How to achieve this?
You could for instance call a the constructor of your base class from the child class constructor like this:
Readonly field and constructor in base class:
Constructors in child class: