private void btnRead_Click(object sender, EventArgs e) { StreamReader reader = new StreamReader("listaproductos.xml"); this.productos = (ColeccionProductos)this.serial.Deserialize(reader); reader.Close(); this.PintarProductos(); }
public Form31SerializarColeccion() { InitializeComponent(); this.serial = new XmlSerializer(typeof(ColeccionProductos)); this.productos = new ColeccionProductos(); }