I have an enumeration with [Flag] attribute set on it.
[Flags]
public enum PageTags { IsBlog = 2, HasAnalytics = 4, AppearsInSitemap = 8 }
Now, from an XML file, I get a string representation of the page metadata:
<page ... tags="IsBlog, HasAnalytics" />
My question is, how can I convert that CSV string into a variable of type PageTags?
PageTags tags = XElement.Attribute("tags").Value.?;