Пример #1
0
        private void BtnLoadXml_Click(object sender, EventArgs e)
        {
            XmlSerializer xmlSeri = new XmlSerializer(typeof(PKW));

            FileStream file = File.Open("xmlFahrzeuge.xml", FileMode.Open);

            PKW pkw1 = (PKW)xmlSeri.Deserialize(file);

            MessageBox.Show(pkw1.ToString());

            file?.Close();
        }