KGy SOFT

BinarySerializer Class

KGy SOFT Core Libraries Help
Provides public static methods for binary serialization. Most of its methods will use a BinarySerializationFormatter instance internally.
See the Remarks section of the BinarySerializationFormatter class for details and an example.
Inheritance Hierarchy

SystemObject
  KGySoft.Serialization.BinaryBinarySerializer

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

public static class BinarySerializer

The BinarySerializer type exposes the following members.

Methods

  NameDescription
Public methodStatic memberCreateFormatter
Creates a formatter that can be used for serialization and deserialization with given options.
Public methodStatic memberDeserialize
Deserializes the specified part of a byte array into an object.
Public methodStatic memberDeserializeByReader
Deserializes data beginning at current position of given reader.
Public methodStatic memberDeserializeFromStream
Deserializes data beginning at current position of given stream.
Public methodStatic memberDeserializeValueArrayT
Deserializes an array of ValueType objects from a byte array that was previously serialized by SerializeValueArray method.
Public methodStatic memberDeserializeValueType(Type, Byte)
Deserializes a ValueType object from a byte array that was previously serialized by SerializeValueType method.
Public methodStatic memberDeserializeValueType(Type, Byte, Int32)
Deserializes a ValueType object from a byte array that was previously serialized by SerializeValueType method beginning on a specified offset.
Public methodStatic memberDeserializeValueTypeT(Byte)
Public methodStatic memberDeserializeValueTypeT(Byte, Int32)
Public methodStatic memberSerialize
Serializes an object into a byte array.
Public methodStatic memberSerializeByWriter
Serializes the given data by using the provided writer.
Public methodStatic memberSerializeToStream
Serializes the given data into a stream.
Public methodStatic memberSerializeValueArrayT
Serializes an Array of ValueType elements into a byte array.
See the Remarks section for details.
Public methodStatic memberSerializeValueType(ValueType)
Serializes a ValueType into a byte array. If the type of the specified instance contains any references, then it is tried to be serialized by marshaling as a fallback option.
See the Remarks section for details.
Public methodStatic memberSerializeValueTypeT(T)
Serializes the specified value into a byte array.
See the Remarks section for details.
Public methodStatic memberTrySerializeValueArrayT
Public methodStatic memberTrySerializeValueType(ValueType, Byte)
Tries to serialize a ValueType into a byte array. The operation will succeed if the type of the specified instance does not contain any references.
See also the Remarks section of the SerializeValueType(ValueType) method for details.
Public methodStatic memberTrySerializeValueTypeT(T, Byte)
Tries to serialize the specified value into a byte array. The operation will succeed if T does not contain any references.
See the Remarks section of the SerializeValueTypeT(T) method for details.
Top
See Also

Reference