示例#1
0
        public static T CreateFromFile <T>(string fileName)
        {
            var text = File.ReadAllText(fileName, FileEncoding);

            return(Serializator.CreateFromXmlString <T>(text));
        }
示例#2
0
        public static void WriteToFile <T>(T data, string fileName)
        {
            var text = Serializator.SerializeToXmlString(data);

            File.WriteAllText(fileName, text, FileEncoding);
        }