IdeaBlade DevForce 2010 Help Reference
Restore(Type,String,IEnumerable<Type>,Boolean) Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > SerializationFns Class > Restore Method : Restore(Type,String,IEnumerable<Type>,Boolean) Method



instanceType
The type of object being 'restored'
fileName
File containing a serialized object
knownTypes
List of known types in the serialized object
useBinaryFormat
True to restore a file in binary format; false if the file is in text format.
Static (Shared in Visual Basic) method which creates and loads an object from the file specified.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Restore( _
   ByVal instanceType As Type, _
   ByVal fileName As String, _
   Optional ByVal knownTypes As IEnumerable(Of Type), _
   Optional ByVal useBinaryFormat As Boolean _
) As Object
Visual Basic (Usage)Copy Code
Dim instanceType As Type
Dim fileName As String
Dim knownTypes As IEnumerable(Of Type)
Dim useBinaryFormat As Boolean
Dim value As Object
 
value = SerializationFns.Restore(instanceType, fileName, knownTypes, useBinaryFormat)
C# 
public static object Restore( 
   Type instanceType,
   string fileName,
   IEnumerable<Type> knownTypes,
   bool useBinaryFormat
)
C++/CLI 
public:
static Object^ Restore( 
   Type^ instanceType,
   String^ fileName,
   IEnumerable<Type^>^ knownTypes,
   bool useBinaryFormat
) 

Parameters

instanceType
The type of object being 'restored'
fileName
File containing a serialized object
knownTypes
List of known types in the serialized object
useBinaryFormat
True to restore a file in binary format; false if the file is in text format.

Return Value

A deserialized object

Remarks

Use Restore to deserialize an object which was previously saved to a file.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.