System.TypInfo.GetSetElementName
Delphi
function GetSetElementName(TypeInfo: PTypeInfo; Value: Integer): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall GetSetElementName(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 string representation of a given constant.
Use GetSetElementName to convert a constant into the symbolic name that represents it in code.
TypeInfo is the type information record that describes the type for which the constant has a meaning. 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 constant, represented as an integer.
GetSetElementName returns the string that represents the specified value.
If TypeInfo describes an Integer type, Value is assumed to be a simple integer and is converted to its numerical string representation. If TypeInfo describes a char type, a string containing the Pascal character notation of Value is returned. If TypeInfo describes an enumerated type, GetEnumName returns the string representation of Value.