I have an enumeration
public enum Color
{
Red = 0,
Blue = 1,
Yellow = 2
}
When I do this:
Color color = Color.Blue;
Console.Writeline(color.Value);
I want to see its integer value (in this case 1), but instead displays "Blue".
How can i solve this?
I am using .NET 3.5.
source
share