Answers for "read only variable in c#"

0

read only variable in c#

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.
Posted by: Guest on October-20-2021

Browse Popular Code Answers by Language