Click or drag to resize
Accord.NET (logo)

SerializerSaveT Method (T, BinaryFormatter, Stream, SerializerCompression)

Saves an object to a stream.

Namespace:  Accord.IO
Assembly:  Accord (in Accord.dll) Version: 3.8.0
public static void Save<T>(
	this T obj,
	BinaryFormatter formatter,
	Stream stream,
	SerializerCompression compression = SerializerCompression.None
Request Example View Source


Type: T
The object to be serialized.
Type: System.Runtime.Serialization.Formatters.BinaryBinaryFormatter
The binary formatter.
Type: System.IOStream
The stream to which the object is to be serialized.
compression (Optional)
Type: Accord.IOSerializerCompression
The type of compression to use. Default is None.

Type Parameters


Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also