I have the following enum type defined:
public enum Level
{
[XmlEnum("1")] ReadLevel = 1,
[XmlEnum("2")] WriteLevel = 2,
}
I also have a list defined which has the type of this enum
public List<Level> MyList
I want to store the list as a comma seperated string with the numbers and read it back and use the enum levels in conditional statements.
The set method I have defined, but how do I markup the get method? Currently
get
{
return string.Join(",", MyList);
}
returns me the text of the enum (like ReadLevel, WriteLevel)