private void addXMLButton_Click(object sender, EventArgs e) { Product product = CreateProduct(); List <Product> products = XmlSave.Deserialize <List <Product> >("exmpl.xml"); products.Add(product); XmlSave.Serialize((List <Product>)products, "exmpl.xml"); this.Close(); }
private void sortToolStripMenuItem1_Click(object sender, EventArgs e) { XmlSave.Serialize <List <Product> >((List <Product>)workProducts, "sortResult.xml"); }