Partager via


DictEnum.index2Symbol(Int32) Method

Definition

Returns the symbol or name of the enumeration item that is specified by an index.

public:
 virtual System::String ^ index2Symbol(int _index);
public virtual string index2Symbol (int _index);
abstract member index2Symbol : int -> string
override this.index2Symbol : int -> string
Public Overridable Function index2Symbol (_index As Integer) As String

Parameters

_index
Int32

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

Returns

The symbol of the enumeration item that is specified by index; an empty string if index does not reference a valid enumeration item.

Remarks

The symbol corresponds to the Name property of the enumeration item in the AOT.

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

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

Applies to