From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function GetEnumName(TypeInfo: PTypeInfo; Value: Integer): string;


extern DELPHI_PACKAGE System::UnicodeString __fastcall GetEnumName(PTypeInfo TypeInfo, int Value);


Type Visibility Source Unit Parent
function public
System.TypInfo System.TypInfo


Returns the name of a Object Pascal enumerated type constant given its value.

Use GetEnumName to convert a Object Pascal enumerated value into the symbolic name that represents it in code.

TypeInfo is the type information record that describes the enumerated type. You can obtain the type information for a type by calling the TypeInfo function in Object Pascal or the __delphirtti operator in C++.

Value is the enumerated value, represented as an integer.

GetEnumName returns the string that represents the specified value.

See Also

Code Examples