I have an enum:
public enum Color { Red, Blue, Green, } Now if I read those colors as literal strings from an XML file, how can I convert it to the enum type Color.
class TestClass { public Color testColor = Color.Red; } Now when setting that attribute by using a literal string like so, I get a very harsh warning from the compiler. :D Can't convert from string to Color.
Any help?
TestClass.testColor = collectionofstrings[23].ConvertToColor?????;