Serializes an object to XML that may be mapped to JavaScript Object Notation (JSON). Writes all the object data, including the starting XML element, content, and closing element, with an XmlWriter.
Public Overrides Sub WriteObject ( _ writer As XmlWriter, _ graph As Object _ )
public override void WriteObject( XmlWriter writer, Object graph )
public: virtual void WriteObject( XmlWriter^ writer, Object^ graph ) override
abstract WriteObject : writer:XmlWriter * graph:Object -> unit override WriteObject : writer:XmlWriter * graph:Object -> unit
The type being serialized does not conform to data contract rules. For example, the DataContractAttribute attribute has not been applied to the type.
There is a problem with the instance being written.
The maximum number of objects to serialize has been exceeded. Check the MaxItemsInObjectGraph property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2