I am trying to deserialize an Xml document to a C# class. The Xml looks something like this:
<response>
<result>Success</result>
</response>
That result can be only "Success" or "Failed". When I deserialize it I want to put the value into a bool with "Success" = true and "Failed" = false. I can't quite figure out how to set the true and valse constants though? The code I have at the moment looks like this.
[XmlRoot(ElementName="response")]
public class Response()
{
[XmlElement(ElementName="result")]
public bool Result { get; set; }
}