Beispiel #1
1
 //adding a contact to the list
 public static bool Add_contact(contacts c)
 {
     try
     {
         cList.Add(c);
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        private void do_search(object sender, TextChangedEventArgs e)
        {
            //when text changes in the textbox the listbox updates itself to select the contact with entered name
            contacts c   = new contacts();
            string   inp = search.Text;
            contacts cn  = c[inp];

            contacts_list.SelectedItem = cn;
        }