I need to deserialize the flowing xml in c#
<Show>
<status>Canceled</status>
</Show>
<Show>
<status>2</status>
</Show>
my class is
[XmlRoot("Show")]`
public class Show
{
[XmlElement(ElementName = "status")]
public object status { get; set; }
}
and it works but i would like to deserialize it into an enum where in this example cancel is equal 2
public enum ShowStatus
{
[XmlEnum("Canceled")]
Canceled = 2
}
is there any way to do that without parse the public object status { get; set; }
string value to enum