The Life and Times of a Dev

Yes, we're really that weird
posts - 179, comments - 302, trackbacks - 106

My Links

News

Twitter









Tag Cloud

Archives

Post Categories

Play

Work

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....
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Friday, May 19, 2006 6:34 AM | Feedback (0) | Filed Under [ Work ]

Powered by: