C
ChInKPoInt [No MCSD]
Say, if I got this enum defined:
enum Colors { Red = 1, Green = 2, Blue = 4 }
If someone passes me a string with value "Red" , how can I Cast it to enum
or convert the variable so that it returns Colors.Red?
string mystring = "Red";
enum Colors { Red = 1, Green = 2, Blue = 4 }
If someone passes me a string with value "Red" , how can I Cast it to enum
or convert the variable so that it returns Colors.Red?
string mystring = "Red";