Timeline for Accessing properties in class
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 24, 2019 at 14:51 | vote | accept | Matthew Metros | ||
Oct 24, 2019 at 13:48 | comment | added | Bryan Anderson |
Unless you want to do something specific when setting or getting a variable, then you don't need to do that. You could have your variable marked as private and then have public get and set methods to access your variable
|
|
Oct 24, 2019 at 13:43 | comment | added | Matthew Metros | @BryanAnderson What about the Get and Set decorators? | |
Oct 24, 2019 at 13:41 | answer | added | Bryan Anderson | timeline score: 0 | |
Oct 24, 2019 at 13:40 | comment | added | Bryan Anderson |
You need to specify public in front of that variable
|
|
Oct 24, 2019 at 13:25 | history | asked | Matthew Metros | CC BY-SA 4.0 |