RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TypInfo.GetEnumName Function

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

Pascal
function GetEnumName(TypeInfo: PTypeInfo; Value: Integer): string;
C++
AnsiString GetEnumName(PTypeInfo TypeInfo, int Value);

TypInfo

Use GetEnumName to convert a Delphi 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 Delphi or the __delphirtti operator in C++. 

Value is the enumerated value, represented as an integer. 

GetEnumName returns the string that represents the specified value. 

 

IntToIdent 

TypeInfo 

GetEnumValue

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!