Beispiel #1
0
 public static string WriteData(T obj, string fullpath)
 {
     try
     {
         Helper_XML.SaveXml(fullpath, (object)obj);
         return((string)null);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
Beispiel #2
0
 public static T ReadData(string FullPath)
 {
     return(Helper_XML.LoadXml(FullPath, typeof(T)) as T);
 }
Beispiel #3
0
 public static T ReadData(Stream stream)
 {
     return(Helper_XML.LoadXml(stream, typeof(T)) as T);
 }
Beispiel #4
0
 public static void SaveXml(string filePath, object obj)
 {
     Helper_XML.SaveXml(filePath, obj, obj.GetType());
 }