Changes between Version 1 and Version 2 of Property
- Timestamp:
- 11/22/10 20:15:33 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Property
v1 v2 21 21 22 22 {{{ 23 #!cobra 23 24 var _nLife = 47 # protected access 24 25 pro nLife from var # property nLife uses backing var _nLife … … 36 37 Can implicitly create initialised backing variable and property in one line like 37 38 {{{ 39 #!cobra 38 40 pro nLife = 47 39 41 }}} … … 99 101 == Examples == 100 102 {{{ 103 #!cobra 101 104 class TimePeriod 102 105 var seconds as float32 is private … … 122 125 123 126 {{{ 127 #!cobra 124 128 class Employee 125 129 var numberOfEmployees as int = 0 … … 156 160 Indexor example 157 161 {{{ 162 #!cobra 158 163 class IdxColl 159 164 var _coll = []