Reply
Thread Tools
Posts: 225 | Thanked: 64 times | Joined on Feb 2010
#1
Guys

In .net, if I have an enum:

enum MyEnum{
Blah = 0,
BlahBlah = 1
}

and have a result:

MyEnum e = getRandomMyEnum(); //returns a random enum entry

I can do this:

e.ToString("g") //instead of "2", I will get "BlahBlah"

to turn my enum into a nice string

-

I read this:

http://labs.trolltech.com/blogs/2008...g-enum-values/

But I'm not sure where to shove the macro that Kevin defined. Any tips?
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:02.