Formatter.Serialize(Stream, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.
当在派生类中重写时,将具有指定根的对象图形序列化为已经连接到格式化程序的流。
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
位于要序列化图形的根位置的对象。
实现
- 属性
实施者说明
必须在派生类中实现此方法。