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,

// 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


Recommended Answers

All 2 Replies

Thanks, I was looking under enum switch, should have been looking for enum parse