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