G
Guest
I know I can do this:
string value = myenum.enum1.ToString(); //= "myenum1"
but how can I do the reverse? Given a string "myenum1", how do I turn it
into myenum.enum1? I was hoping there's some more clever way than this:
myenum x = value=="myenum1" ? myenum.enum : ...;
string value = myenum.enum1.ToString(); //= "myenum1"
but how can I do the reverse? Given a string "myenum1", how do I turn it
into myenum.enum1? I was hoping there's some more clever way than this:
myenum x = value=="myenum1" ? myenum.enum : ...;