BinarySerializerSerialize Method

Serializes an object into a byte array.

Definition

Namespace: KGySoft.Serialization.Binary
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static byte[] Serialize(
	Object? data,
	BinarySerializationOptions options = BinarySerializationOptions.CompactSerializationOfStructures
)

Parameters

data  Object
The object to serialize
options  BinarySerializationOptions  (Optional)
Options of the serialization. This parameter is optional.
Default value: CompactSerializationOfStructures.

Return Value

Byte
Serialized raw data of the object

See Also