data members

Declares stored data on a custom type.

Target language

Signature

1data public name::type

Declares stored data on a custom type.

data members is part of the core language syntax. data members belongs to the object model. Use type constraints to document the value you expect and member syntax when behavior naturally belongs to an object.

Examples

Basic call

1data public title::string
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.