This documentation is archived and is not being maintained.

SoapFormatter.Serialize Method (Stream, Object, Header[])

Serializes an object or graph of objects with the specified root to the given Stream in the SOAP Remote Procedure Call (RPC) format.

Namespace: System.Runtime.Serialization.Formatters.Soap
Assembly: System.Runtime.Serialization.Formatters.Soap (in system.runtime.serialization.formatters.soap.dll)

public void Serialize (
	Stream serializationStream,
	Object graph,
	Header[] headers
)
public final void Serialize (
	Stream serializationStream, 
	Object graph, 
	Header[] headers
)
public final function Serialize (
	serializationStream : Stream, 
	graph : Object, 
	headers : Header[]
)
Not applicable.

Parameters

serializationStream

The stream onto which the formatter puts the data to serialize.

graph

The object or root of the object graph to serialize. All child objects of this root object are automatically serialized.

headers

Remoting headers to include in the serialization. Can be a null reference (Nothing in Visual Basic).

Exception typeCondition

ArgumentNullException

serializationStream is a null reference (Nothing in Visual Basic).

Headers are used only for specific remoting applications.

TimeSpan objects are serialized according to the ISO 8601: 1998 section 5.5.3.2.1 "Alternative" standard.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: