Read an object T from an Xml file.
Namespace:
Devolutions.UtilsAssembly: Devolutions.Utils (in Devolutions.Utils.dll)
Syntax
| Visual Basic |
|---|
Public Shared Function LoadObjectFromFile(Of T As New) ( _ fileName As String, _ createAnInstanceIfNotExists As Boolean _ ) As T |
| C# |
|---|
public static T LoadObjectFromFile<T>( string fileName, bool createAnInstanceIfNotExists ) where T : new() |
Parameters
- fileName
- Type: System..::..String
- createAnInstanceIfNotExists
- Type: System..::..Boolean
Indicate if the method must create an empty instance if the file does not exists.
Type Parameters
- T