Compartir a través de


DictEnum.index2Value(Int32) Method

Definition

Returns the value of the enumeration item that is specified by an index.

public:
 virtual int index2Value(int _index);
public virtual int index2Value (int _index);
abstract member index2Value : int -> int
override this.index2Value : int -> int
Public Overridable Function index2Value (_index As Integer) As Integer

Parameters

_index
Int32

The zero-based index of the enumeration in the AOT.

Returns

The value of the enumeration item that is specified by index.

Remarks

The following example shows the retrieval of the value for items in an enumeration.

DictEnum de; 
int      i; 
de = new DictEnum(enumName2Id("ActionType")); 
for (i=0; i < de.values(); i++) 
{ 
    print int2str(i) + ", " + int2str(de.index2Value(i)); 
}

Applies to