Пример #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);
        }