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


The type of instance to deserialize
Stream to be read
Whether or not to close the stream when done.
List of known types in the serialized object
True to restore data in binary format; false if the data is in text format.
Static (Shared in Visual Basic) method which creates and loads an object from the stream specified.
Syntax
'Declaration
 
Public Overloads Shared Function Restore( _
   ByVal instanceType As Type, _
   ByVal stream As Stream, _
   ByVal closeOnExit As Boolean, _
   Optional ByVal knownTypes As IEnumerable(Of Type), _
   Optional ByVal useBinaryFormat As Boolean _
) As Object
'Usage
 
Dim instanceType As Type
Dim stream As Stream
Dim closeOnExit As Boolean
Dim knownTypes As IEnumerable(Of Type)
Dim useBinaryFormat As Boolean
Dim value As Object
 
value = SerializationFns.Restore(instanceType, stream, closeOnExit, knownTypes, useBinaryFormat)

Parameters

instanceType
The type of instance to deserialize
stream
Stream to be read
closeOnExit
Whether or not to close the stream when done.
knownTypes
List of known types in the serialized object
useBinaryFormat
True to restore data in binary format; false if the data is in text format.

Return Value

An object
Remarks
Use Restore to deserialize an object which was previously saved to a stream or file.
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