I have a list of strings in an xml document:
<properties>red yellow blue</properties>
and I have an enum:
[Flags]
public enum Properties
{
None = 0,
red = 1,
yellow = 2,
blue = 4,
green = 8
}
Is there a way to convert the XML string into the enum flag value of 7
or 0111
?
There are countless resources around about doing the reverse of this, but I'm having trouble finding any information on converting from a string to Flags.