Exemplo n.º 1
0
        public void Write(Ders7.Number1 number)
        {
            FileStream    file = new FileStream("Main.xml", FileMode.OpenOrCreate);
            XmlSerializer xml  = new XmlSerializer(typeof(Ders7.Number1));

            xml.Serialize(file, number);
            file.Flush();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Number1 Iftixar = new Number1 {
                Name = "Iftixar", Surname = "Babayev"
            };

            Iftixar.Show();

            WriteLine("***************************************");
            Worker Resul = new Worker {
                Name = "Resul", Surname = "Babayev", Salary = 250
            };

            Resul.Show();
        }