Geeks With Blogs
The Life and Times of a Dev Yes, we're really that weird May 2006 Entries
Overriding the ToString() function of an enum.
I like enums, but sometimes I wish I could provide a better mechanism for getting the descriptive name for the enum. I did a search for better mechanisms and really like the result I found at http://www.dotnet247.com/24... Basically, you use the [Description(”Descrip... attribute to put the description into the enum. Note that the Description attribute could also contain a resource string identifier, so that you could easily do localization. Nice and neat. ......

Posted On Friday, May 19, 2006 6:34 AM

Copyright © Robert May | Powered by: GeeksWithBlogs.net | Join free