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


Saves a serialized object to a file.
Syntax
'Declaration
 
Public Overloads Shared Sub Save( _
   ByVal instance As Object, _
   ByVal fileName As String, _
   Optional ByVal knownTypes As IEnumerable(Of Type), _
   Optional ByVal useBinary As Boolean _
) 
'Usage
 
Dim instance As Object
Dim fileName As String
Dim knownTypes As IEnumerable(Of Type)
Dim useBinary As Boolean
 
SerializationFns.Save(instance, fileName, knownTypes, useBinary)

Parameters

instance
fileName
knownTypes
useBinary
Exceptions
ExceptionDescription
System.UnauthorizedAccessExceptionThe exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.
System.Security.SecurityExceptionThe exception that is thrown when a security error is detected.
System.IO.IOExceptionThe exception that is thrown when an I/O error occurs.
Remarks
The object is serialized to the file in either binary or text format. The user must have write permissions to the directory, and if the file exists it will be overwritten.
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