Formatter.Serialize(Stream, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.
當覆寫於衍生類別時,使用已附加於格式子的資料流指定根 (Root),序列化物件的 Graph。
public:
abstract void Serialize(System::IO::Stream ^ serializationStream, System::Object ^ graph);
[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 abstract void Serialize (System.IO.Stream serializationStream, object graph);
public abstract void Serialize (System.IO.Stream serializationStream, object graph);
[<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 Serialize : System.IO.Stream * obj -> unit
abstract member Serialize : System.IO.Stream * obj -> unit
Public MustOverride Sub Serialize (serializationStream As Stream, graph As Object)
參數
- serializationStream
- Stream
物件要序列化的目的資料流。
- graph
- Object
物件,位在要序列化的 Graph 的根。
實作
- 屬性
給實施者的注意事項
您必須在衍生類別中實作這個方法。