i need an enum or something similiar to do something like this:
public enum MyStringEnum { [StringValue("Foo A")] Foo = "A", [StringValue("Foo B")] Foo = "B" }
is this possible? my example, i return back a dataset with a value represented as either A,B,C,D,E .. i need a solution to return this as a string representation?
i guess the obvious would be to create an extension method or something which just had a switch statement in and return a string .. any other cleaner solutions?
regards, dave
The approved types for an enum are byte, sbyte, short, ushort, int, uint, long, or ulong.msdn.microsoft.com/en-us/library/sbbt4032.aspx