private void gestionListe() { lstContact.Items.Clear(); foreach (Contact contact in listeContact) { lstContact.Items.Add(contact.infosContact()); } Serialise.Sauve(sauvegarde, listeContact); }
private void gestionContact_Load(object sender, EventArgs e) { Object recuperation = Serialise.Recup(sauvegarde); if (recuperation != null) { listeContact = (List <Contact>)recuperation; } gestionListe(); lstContact.SelectedIndex = 0; }