Tag - readonly

C# Keywords Tutorial Part 68: readonly

In C#, the readonly keyword is used to declare that a field or variable can only be assigned a value once, either at the time of declaration or in the constructor of the class where it's defined. Once assigned, the value cannot be changed for the lifetime of the instance. Here's a brief explanation and...