I have a class that I am serializing using System.Xaml.XamlObjectReader
and the System.Xaml.XamlXmlWriter
. Everything goes good on everything until I get to my property that contains an XDocument
. I get Unable to serialize type 'System.Xml.Linq.XDeclaration'.
How can I during my while loop to serialize the object nodes to disk get it to write out the xml in this property?