Share via


DictEnum.value2Name Method

Returns the name of a specified enumeration value.

Syntax

public str value2Name(int value)

Run On

Called

Parameters

  • value
    Type: int
    The integer value for the enumeration for which the label is being retrieved.

Return Value

Type: str
The name for value; an empty string if there is no name for value or value is not a valid enumeration.

Remarks

To determine whether a value is in the enumeration, use the value2Symbol method instead. The value2Name method cannot be used to determine whether a value is in the enumeration, because enumeration items are not required to have a label.

See Also

DictEnum Class

DictEnum.value2Symbol Method