Given:
class Parser {
public Parser(TextReader source) => Source = source;
public int GetChar() => Source.Read();
private readonly TextReader Source = null;
}
How can TextReader be marked readonly? I mean, you are reading from a buffer and things are changing. What am I missing?
Originally, I had Source without the readonly but it was suggested by a code helper and it does compile.
Thanks