Access Methods (properties)

From RAD Studio
Jump to: navigation, search

Go Up to Defining Properties


You can specify an access method instead of a field in the read and write parts of a property declaration. Access methods should be protected, and are usually declared as virtual; this allows descendent components to override the property's implementation.

Avoid making access methods public. Keeping them protected ensures that application developers do not inadvertently modify a property by calling one of these methods.

Topics

See Also