Quantcast
Channel: Answers for "What is setter and getters??,What is setter and getters"
Browsing all 6 articles
Browse latest View live

Answer by ptdnet

They are public functions that can be called to GET or SET the value of a private variable. public myclass { private int _score; public int MyScore { get { return _score; } set { _score = value; } } }...

View Article



Answer by aldonaletto

One of the most interesting OOP ideas is the concept of *property*. A property looks like an ordinary variable, but the big difference is the use of *getter* and *setter*, routines that are internally...

View Article

Answer by Peter G

I'm probably not going to say too much that hasn't already been said, but I'm going to add a few things. Properties are *function* calls for getting and setting a value. They are most useful for...

View Article

Answer by ptdnet

They are public functions that can be called to GET or SET the value of a private variable. public myclass { private int _score; public int MyScore { get { return _score; } set { _score = value; } } }...

View Article

Answer by aldonaletto

One of the most interesting OOP ideas is the concept of *property*. A property looks like an ordinary variable, but the big difference is the use of *getter* and *setter*, routines that are internally...

View Article


Answer by Peter G

I'm probably not going to say too much that hasn't already been said, but I'm going to add a few things. Properties are *function* calls for getting and setting a value. They are most useful for...

View Article
Browsing all 6 articles
Browse latest View live




Latest Images