I have this method in class Foo:
public Foo DeserializeXML(string sXML)
{
XmlSerializer serializer = new XmlSerializer(typeof(Foo));
StringReader sr = new StringReader(sXML);
return (Foo)serializer.Deserialize(sr);
}
which seems to work fine if I do this:
Foo myFoo = new Foo();
myFoo = myFoo.Deserialize(myXMLString);
I'm trying to figure out if there's a simple way to do the
deserialization in a constructor.
TIA,
Jim