private void BindList() { //Bind to listbox _listContacts.Items.Clear(); _listContacts.DisplayMember = nameof(Contact.Name); _listContacts.Items.AddRange(_contacts.GetAll()); }
private void RefreshContacts() { var contacts = from c in _database.GetAll() orderby c.Name select c; _listContacts.Items.Clear(); _listContacts.Items.AddRange(contacts.ToArray()); }