NetDataContractSerializer.WriteObject(XmlWriter, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified XmlWriter.
public:
override void WriteObject(System::Xml::XmlWriter ^ writer, System::Object ^ graph);
public override void WriteObject (System.Xml.XmlWriter writer, object graph);
override this.WriteObject : System.Xml.XmlWriter * obj -> unit
Public Overrides Sub WriteObject (writer As XmlWriter, graph As Object)
Parameters
- graph
- Object
The object containing the content to write.
Exceptions
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 serialized.
the maximum number of object to serialize has been exceeded. Check the MaxItemsInObjectGraph property.