I need a get method for a readonly attribute
public readonly string accountNumber { get;}
doesn't work. Is there a way to create a get methode without creating a new extra attribute?
I need a get method for a readonly attribute
public readonly string accountNumber { get;}
doesn't work. Is there a way to create a get methode without creating a new extra attribute?
The answer of Brad M was correct, if you use a get without readonly, the property is by default readonly, so you dont have to write it again. thanks