Formatter.Serialize(Stream, Object) Método

Definição

Cuidado

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

Quando substituído em uma classe derivada, serializa o grafo de objetos com a raiz especificada para o fluxo já anexado ao formatador.

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)

Parâmetros

serializationStream
Stream

O fluxo para o qual os objetos são serializados.

graph
Object

O objeto na raiz do grafo a ser serializado.

Implementações

Atributos

Notas aos Implementadores

Você deve implementar esse método em uma classe derivada.

Aplica-se a

Confira também