Method GetEnumValueNames
GetEnumValueNames(string, bool)
Gets the enum value names corresponding to the given enum type.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 8, 0, 0)]
List<string> GetEnumValueNames(string inEnumTypeName, bool inLocalized)
Parameters
| Type | Name | Description |
|---|---|---|
| string | inEnumTypeName | Type full name of the enum to analyze. |
| bool | inLocalized | True if the names must be localized according to TopSolid user interface culture. |
Returns
| Type | Description |
|---|---|
| List<string> | Enum value names corresponding to the enum type. The result is a list where each value of the enum is at its index in the list. For instance, an enum with 0,1,2 and 4 will return the list { zero, one, two, __, four }. Result[4] gives "four" ! |
Remarks
An integer parameter can hold a value taken from an enumeration. To know which values can be used, a user must be able to select this value in a listbox or a combo. But if a combo filled with 0,1 and 2 is not very expressive. So use this function to get the localized text corresponding to 0,1 and 2!