"name" of enum members

spir denis.spir at gmail.com
Fri Feb 11 10:18:08 PST 2011


On 02/11/2011 06:49 PM, Jesse Phillips wrote:
> spir Wrote:
>
>> Hello,
>>
>> To denote a member 'm' of an enum 'e', one needs to write "e.m". Is there a way
>> to get back this "name"?
>> Here are my best trials:
>
> Maybe to!string(Enum.i) should return the enum name with it's field. This makes since because it is trying to return its name, and for named enums, where it comes from is important.

That's what I wrote, precisely (see example in OP), and it returns only "i".

denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d-learn mailing list