Is their a way where the user could type Low to use the enum instead of typing 1?
I know how to do this with strings, but am having trouble trying to figure it out using enums.
public enum Volume : byte
{
Low = 1,
Medium,
High
}
// shows different ways
// to work with enums
class Enumtricks
{
static void Main(string[] args)
{
// instantiate type
Enumtricks enumtricks = new Enumtricks();
// demonstrates explicit cast
// of int to Volume
enumtricks.GetEnumFromUser();
Console.ReadLine();
}