แชร์ผ่าน


DictField.enumId Method

Definition

Returns the ID of the enumeration if the field is based on an enumeration.

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

Returns

The enumeration ID if the field is based on an enumeration; otherwise, 0 (zero).

Remarks

The following example shows the retrieval of the enumeration ID and the enumeration name of a field that is based on an enumeration.

DictField df; 
DictEnum  de; 
enumId    id; 
df = new DictField(tablenum(CustTable), fieldnum(CustTable, AccountNum)); 
if (df) 
{ 
    id = df.enumId(); 
    if (0 != id) 
    { 
        de = new DictEnum(id); 
        if (de) 
        { 
            print de.name(); 
        } 
    } 
}

Applies to