📜  c# 中的只读变量 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:55.739000             🧑  作者: Mango

代码示例1
The readonly keyword can be used to define a variable or an object as readable only. This
means that the variable or object can be assigned a value at the class scope or in a
constructor only. You cannot change the value or reassign a value to a readonly variable or
object in any other method except the constructor.