I have defined the following class:
public class Root
{
public string Name;
public string XmlString;
}
and created an object:
Root t = new Root
{ Name = "Test",
XmlString = "<Foo>bar</Foo>"
};
When I use XmlSerializer class to serialize this object, it will return the xml:
<Root>
<Name>Test</Name>
<XmlString><Foo>bar</Foo></XmlString>
</Root>
How do I make it not encode my XmlString content so that I can get the serialized xml as
<XmlString><Foo>bar</Foo></XmlString>
Thanks, Ian