Skip to main content

Private (Property Keyword)

Specifies whether the property is private (can be used only by methods of this class or its subclasses).

Usage

To specify that the property is private, use the following syntax:

Property name As classname [ Private ];

Otherwise, omit this keyword or place the word Not immediately before the keyword.

Details

A private class member can only be used by methods of this class (or its subclasses).

A private property is not displayed in the catalog information (accessed by using %Library.SQLCatalogOpens in a new tab) and is not returned by a SELECT * query. However, you can explicitly refer to and use a private property in an SQL query.

Subclasses inherit the value of the Private keyword and cannot override it.

In InterSystems IRIS, private properties are always inherited and visible to subclasses of the class that defines the property; other languages often call these protected properties.

Default

If you omit this keyword, this property is not private.

See Also

FeedbackOpens in a new tab