ערוך

שתף באמצעות


Formatter.Serialize(Stream, Object) Method

Definition

Caution

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

When overridden in a derived class, serializes the graph of objects with the specified root to the stream already attached to the formatter.

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)

Parameters

serializationStream
Stream

The stream to which the objects are serialized.

graph
Object

The object at the root of the graph to serialize.

Implements

Attributes

Notes to Implementers

You must implement this method in a derived class.

Applies to

See also