In the constructors, methods, or destructor of a class, you can write code to directly access the data members of the class. You access the data members by name, but you can also type the keyword this-object: in the editor. When you do so, the editor provides a drop-down list of all available data members in the class for you to choose from. This makes it easier to find the data member name that you want to use when you are working with a large class.

Here is the syntax for using a data member from within a class:

[this-object:]<data-member>

Syntax Element

Description

data-member

The name of a data member in the class

See also: