Does C# allow a variable that can\'t be modified? It\'s like a const, but instead of having to assign it a value at declaration, the variable does not have any
const
You can declare a readonly field variable which can be set only in the constructor or directly through its declaration.
readonly