Progress® Telerik® Reporting R3 2017

ReportXmlSerializerSerialize Method (Stream, Object)

Serializes the specified value and writes the XML document to the specified Stream.

Namespace:  Telerik.Reporting.XmlSerialization
Assembly:  Telerik.Reporting (in Telerik.Reporting.dll)

Syntax

public void Serialize(
	Stream stream,
	Object value
)

Parameters

stream
Type: System.IOStream
The Stream used to write the XML document.
value
Type: SystemObject
The value to serialize.

Remarks

Use the stream parameter to specify an object that derives from the abstract Stream class. Classes that derive from the Stream class include: BufferedStream, FileStream, MemoryStream, etc.

Examples

The following examples serializes an object using a Stream:
using (System.IO.Stream stream = new System.IO.FileStream("Report.xml", System.IO.FileMode.Create))
{
    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer =
        new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();

    xmlSerializer.Serialize(stream, report);
}

See Also