
Untitled
By: a guest on
Jul 30th, 2012 | syntax:
C# | size: 0.20 KB | hits: 14 | expires: Never
enum Foo
{
Word,
[Description("Two Words")]
TwoWords,
}
Foo bar = Foo.TwoWords;
bar.ToDescription() // returns "Two Words" (and is the same as ToString() for anything without a tag)