Converting string to enumeration value:
MyEnum bar = (MyEnum)Enum.Parse(typeof(MyEnum), foobar);
It’s one of those things that makes sense, and you should have just tried it from the start, but for some reason you thought making converter functions would be the way to go. Much time saved now. Yum.
Post a Comment