Gambas Documentation - /lang/special/get

/lang/special/get

# _get

[ Static ] Public Sub _get ( ... ) As Datatype

The `_get` method is called when the `[]` operator is used on the object or the class to extract data.

The method can be static. Then, the `[]` operator will have to be used on the class, not the object.

The method must take one or more arguments. These arguments will be those passed between the `[` and the `]` operators.

For example, the instruction `Value = MyObject[X, Y]` will cause a call to `_get` with X and Y as arguments.

This method must return the data extract from the object or the class.

### See also

- Special Methods