C#: constant and readonly

readonly fields are similar to constant fields in that they can’t be modified after initialization. The biggest difference between the two is when they’re initialized: Constants are
initialized during compilation, and readonly fields are initialized during runtime.

你可能感兴趣的:(readOnly)