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