BinarySerializerDeserializeT(Byte, Int32, Type) Method

Deserializes the specified part of a byte array into an instance of T using safe mode.
See the Remarks section of the DeserializeT(Byte, Int32, BinarySerializationOptions, Type) overload for details.

Definition

Namespace: KGySoft.Serialization.Binary
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static T Deserialize<T>(
	byte[] rawData,
	int offset = 0,
	params Type[]? expectedCustomTypes
)

Parameters

rawData  Byte
Contains the raw data representation of the object to deserialize.
offset  Int32  (Optional)
Points to the starting position of the object data in rawData. This parameter is optional.
Default value: 0.
expectedCustomTypes  Type
The types that are expected to present in rawData by name. If rawData does not contain any types by name, then this parameter is optional.

Type Parameters

T
The expected type of the result.

Return Value

T
The deserialized instance of T.

See Also