Readonly properties | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponse
+ 1
If you want your property to be readonly, you just leave out the "set" part.
25th May 2020, 10:50 PM
CapCode