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) | ![]() |
---|---|
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 objectUse Restore to deserialize an object which was previously saved to a file.
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