共用方式為


IFormatter.Deserialize(Stream) 方法

定義

警告

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

還原序列化在提供的資料流上的資料,並重新組合物件 Graph。

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

參數

serializationStream
Stream

資料流,包含要還原序列化的資料。

傳回

還原序列化 Graph 的最上層物件。

屬性

備註

方法 Deserialize 會從數據流讀取圖形資訊,並重新建構原始圖形的複本。 會保留圖形的拓撲。

還原串行化程式會配置適當類型的空白物件,並從數據流中 serializationStream 傳輸的數據重新填入其欄位。 請務必注意,還原串行化期間物件上不會呼叫任何建構函式。

適用於

另請參閱