示例#1
0
文件: Program.cs 项目: maff/se3ue7
        /**
         * TODO: implement BinaryWriter/Reader
         *
        public static void serializeBinary(string path, Veranstaltung lv)
        {
        }

        public static Veranstaltung deserializeBinary(string path)
        {
        }*/
        public static void serializeXml(string path, Veranstaltung lv)
        {
            XmlSerializer xmlSer = new XmlSerializer(typeof(Veranstaltung));
               FileStream fileStream = new FileStream(path, FileMode.Create);
               xmlSer.Serialize(fileStream, lv);
               fileStream.Close();
        }
示例#2
0
文件: Program.cs 项目: maff/se3ue7
 public static void serializeBinaryFormatter(string path, Veranstaltung lv)
 {
     BinaryFormatter binFor = new BinaryFormatter();
     FileStream fileStream = new FileStream(path, FileMode.Create);
     binFor.Serialize(fileStream, lv);
     fileStream.Close();
 }