Click or drag to resize

SerializerTSerialize Method (IEnumerableT, Stream, Encoding)

Serializes a list of objects to a stream.

Namespace:  Enkoni.Framework.Serialization
Assembly:  Enkoni.Framework.Serialization (in Enkoni.Framework.Serialization.dll) Version: 1.3.0.1
Syntax
public int Serialize(
	IEnumerable<T> objects,
	Stream stream,
	Encoding encoding
)

Parameters

objects
Type: System.Collections.GenericIEnumerableT
The collection of objects that must be serialized.
stream
Type: System.IOStream
The stream to which the objects must be serialized.
encoding
Type: System.TextEncoding
The encoding that must be used to serialize the data.

Return Value

Type: Int32
The number of bytes that have been written to the stream.
Exceptions
ExceptionCondition
ArgumentNullExceptionThe parameter is null.
ArgumentExceptionThe stream is read-only.
See Also