BinarySerializerDeserializeByReader(BinaryReader, BinarySerializationOptions) Method
Deserializes the content of a serialization stream wrapped by the specified
reader from its current position into an object.
If
SafeMode is enabled in
options and the stream
contains natively not supported types by name, then you should use the other overloads to specify the expected types.
See the
Remarks section of the
DeserializeByReaderT(BinaryReader, BinarySerializationOptions, Type) overload for details.
Namespace: KGySoft.Serialization.BinaryAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public static Object? DeserializeByReader(
BinaryReader reader,
BinarySerializationOptions options = BinarySerializationOptions.SafeMode
)
Public Shared Function DeserializeByReader (
reader As BinaryReader,
Optional options As BinarySerializationOptions = BinarySerializationOptions.SafeMode
) As Object
public:
static Object^ DeserializeByReader(
BinaryReader^ reader,
BinarySerializationOptions options = BinarySerializationOptions::SafeMode
)
static member DeserializeByReader :
reader : BinaryReader *
?options : BinarySerializationOptions
(* Defaults:
let _options = defaultArg options BinarySerializationOptions.SafeMode
*)
-> Object
- reader BinaryReader
- The reader that wraps the stream containing the serialized data. The reader will remain open after deserialization.
- options BinarySerializationOptions (Optional)
- Options of the deserialization. This parameter is optional.
Default value: SafeMode.
ObjectThe deserialized data.