Share via


DictEnum.index2Label(Int32) Method

Definition

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

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

Parameters

_index
Int32

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

Returns

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

Remarks

The following example shows the retrieval of the label 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.index2Label(i); 
}

Applies to