Formatter.Serialize(Stream, Object) Method (System.Runtime.Serialization) (original) (raw)
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
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}")]
public abstract void Serialize(System.IO.Stream serializationStream, object graph);
abstract member Serialize : System.IO.Stream * obj -> unit
[<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
Public MustOverride Sub Serialize (serializationStream As Stream, graph As Object)
Parameters
serializationStream
The stream to which the objects are serialized.
graph
The object at the root of the graph to serialize.
Implements
Attributes
Notes to Implementers
You must implement this method in a derived class.