Struct.valueIndex Method

Gets or sets the value of the item at a specified position in a struct.

Syntax

public anytype valueIndex(int index, [anytype value])

Run On

Called

Parameters

  • index
    Type: int
    The position of the item in the struct.
  • value
    Type: anytype
    The value to assign to the item at the position specified by index; optional.

Return Value

Type: anytype
The value of the item at the position specified by index.

Remarks

An exception is raised if there is no item at the position specified by index. The position of an item in a struct can be retrieved by using the Struct.index method.

See Also

Struct Class

Struct.index Method

Struct.value Method