संपादित करें

इसके माध्यम से साझा किया गया


IFormatter.Deserialize(Stream) Method

Definition

Caution

BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.

Deserializes the data on the provided stream and reconstitutes the graph of objects.

public:
 System::Object ^ Deserialize(System::IO::Stream ^ serializationStream);
[System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public object Deserialize (System.IO.Stream serializationStream);
public object Deserialize (System.IO.Stream serializationStream);
[<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Deserialize : System.IO.Stream -> obj
abstract member Deserialize : System.IO.Stream -> obj
Public Function Deserialize (serializationStream As Stream) As Object

Parameters

serializationStream
Stream

The stream that contains the data to deserialize.

Returns

The top object of the deserialized graph.

Attributes

Remarks

The Deserialize method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved.

The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the serializationStream stream. It is important to note that no constructor is ever called on the object during deserialization.

Applies to

See also