Readonly properties
The easiest way to remember whether to use
readonly
or const
is to ask whether you're using it on a variable or a property. Variables use const
whereas properties use readonly
.