DevForce Help Reference
Save(Object,Stream,Boolean,IEnumerable<Type>,Boolean) Method


Saves an object to a Stream, optionally closing the stream when done.
Syntax
'Declaration
 
Public Overloads Shared Sub Save( _
   ByVal instance As Object, _
   ByVal stream As Stream, _
   ByVal closeOnExit As Boolean, _
   Optional ByVal knownTypes As IEnumerable(Of Type), _
   Optional ByVal useBinary As Boolean _
) 
'Usage
 
Dim instance As Object
Dim stream As Stream
Dim closeOnExit As Boolean
Dim knownTypes As IEnumerable(Of Type)
Dim useBinary As Boolean
 
SerializationFns.Save(instance, stream, closeOnExit, knownTypes, useBinary)

Parameters

instance
stream
closeOnExit
knownTypes
useBinary
Remarks
The object is serialized to the stream in either binary or text format.

If the UseDCS flag is on, the object is serialized with the DataContractSerializer; otherwise the NetDataContractSerializer is used. UseDCS is on by default, and is assumed to be on in Silverlight, where the NDCS serializer is not supported.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SerializationFns Class
SerializationFns Members
Overload List

Send Feedback