KGy SOFT

BinarySerializationFormatterSerializeByWriter Method

KGy SOFT Core Libraries Help
Serializes the given data by using the provided writer.

Namespace:  KGySoft.Serialization.Binary
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 6.0.0
Syntax

public void SerializeByWriter(
	BinaryWriter writer,
	Object? data
)

Parameters

writer
Type: System.IOBinaryWriter
The writer that will used to serialize data. The writer will remain opened after serialization.
data
Type: SystemObject
The data that will be written by the writer.
Remarks

Note Note
This method produces compatible serialized data with Serialize and SerializeToStream methods only when encoding of the writer is UTF-8. Otherwise, you must use DeserializeByReader with the same encoding as here.
See Also

Reference