System.TypInfo.GetEnumName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

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

Description

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

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.

See Also

Code Examples