What is the use of making the class member timeouts readonly in the code below, what is the effect? I think the content of the timeouts list can still be changed, the only thing that is being prohibited is assigning a new Dictionary object to it. Is that right? And is this good coding, since no programmer would think of assigning a new value to the initialized list anyway, after it is constructed. Why is the keyword readonly put here? I think it prohibits something nobody will do anyway, but I could be wrong.
private class Processor { readonly Dictionary timeouts = new Dictionary();
Last edited by a moderator: