Reputation: 31204
I have an enum
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 it's integer-value (1 in this case), but it outputs "Blue" instead.
How can I solve this?
I use .NET 3.5.
Upvotes: 2
Views: 224