Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XmlSerializer.Serialize Method (Object, XmlSerializationWriter)

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Serializes the specified Object and writes the XML document to a file using the specified XmlSerializationWriter.

Namespace:  System.Xml.Serialization
Assembly:  System.Xml.Serialization (in System.Xml.Serialization.dll)
'Declaration
Protected Overridable Sub Serialize ( _
	o As Object, _
	writer As XmlSerializationWriter _
)

Parameters

o
Type: System.Object
The Object to serialize.
writer
Type: System.Xml.Serialization.XmlSerializationWriter
The XmlSerializationWriter used to write the XML document.
ExceptionCondition
NotImplementedException

Any attempt is made to access the method when the method is not overridden in a descendant class.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 The XmlSerializer.Serialize method throws an InvalidOperationException if the XmlSerializer object is initialized with a type parameter that contains an array of objects of type XElement.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.