Associating enums with strings in C#
Posted
by boris callens
on Stack Overflow
See other posts from Stack Overflow
or by boris callens
Published on 2009-03-10T15:33:44Z
Indexed on
2010/03/21
10:31 UTC
Read the original article
Hit count: 202
I know the following is not possible because it has to be an int
enum GroupTypes
{
TheGroup = "OEM",
TheOtherGroup = "CMB"
}
From my database I get a field with incomprehensive codes (the OEM and CMB's). I would want to make this field into an enum or something else understandable. Because the target is readability the solution should be terse.
What other options do I have?
© Stack Overflow or respective owner