I have a string variable with the value "Top;Left". Is it possible to easily parse this to Control.Anchor (without using if‘s)?
Enum.Parse doesn’t work because Anchor can take a value, for example, Top;Left;, but the AnchorEnum can only take Top, or Left, or Right, or Bottom, or None.
It’s easy to parse this without iterating over each option.
The only gotcha is it has to be comma separated, not semicolon.