Readonly properties | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Readonly properties

Trying to use readonly keyword to apply on a "readonly property" but seems not work. Some way? Or must made it without readonly keyword using "private set"? Thx

25th May 2020, 8:51 PM
Kiwwi#
Kiwwi# - avatar
1 Resposta
+ 1
If you want your property to be readonly, you just leave out the "set" part.
25th May 2020, 10:50 PM
CapCode