| Description |
Returns an array of strings contaiing the names for the given EnumeratedType.
An enumeration is essentially a set of named constants. Each name is converted into a string and stored in the dynamically built returned array.
The names are sorted into the name numeric constant value sequence before being returned.
|
|
| Microsoft MSDN Links |
System
System.Enum
|
|
|
| A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
Names : Array of String;
i : Integer;
begin
// Get the list of enumeration names
Names := System.Enum.GetNames(TypeOf(System.DayOfWeek));
// Display the list
for i := 0 to Length(Names)-1 do
Console.WriteLine(Names[i]);
Console.ReadLine;
end.
| | Show full unit code | Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
|
| |
|
|
|