Comparteix a través de


Formatter.Serialize(Stream, Object) Método

Definición

Precaución

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

Cuando se reemplaza en una clase derivada, serializa el gráfico de objetos con la raíz especificada para la secuencia ya conectada al formateador.

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

Secuencia para la que se serializan los objetos.

graph
Object

Objeto de la raíz del gráfico que se va a serializar.

Implementaciones

Atributos

Notas a los implementadores

Debe implementar este método en una clase derivada.

Se aplica a

Consulte también