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 default value, but can only be assigned a value once at runtime (EDIT: and possibly not from constructor). or is this not possible?
Does C# allow a variable that can’t be modified? It’s like a const ,
Share
You could create your own generic class that provided this functionality, but that might be overkill.