Property (programming)
From Wiki @ Karl Jones dot com
Revision as of 08:30, 4 September 2016 by Karl Jones (Talk | contribs) (Created page with "In some object-oriented programming languages, a '''property''' is a special sort of class member, intermediate between a Field (compute...")
In some object-oriented programming languages, a property is a special sort of class member, intermediate between a field (or data member) and a method.
Description
Properties are read and written like fields, but property reads and writes are (usually) translated to get and set method calls.
The field-like syntax is said to be easier to read and write than lots of method calls, yet the interposition of method calls allows for data validation, active updating (as of GUI visuals), or read-only 'fields'.
That is, properties are intermediate between member code (methods) and member data (instance variables) of the class, and properties provide a higher level of encapsulation than public fields.
See also
- Bound property
- Class (computer programming)
- Field (computer science)
- Indexer (programming)
- Method (computer programming)
- Mutator method
- Uniform access principle
External links
- Property (programming) @ Wikipedia.org