private void btnnamesearch_Click(object sender, EventArgs e) { ts.SortByName(); Deliverable d = ts.BinarySearchByName((tbname.Text), 0, ts.SortedList.Count - 1); MessageBox.Show(d != null ? d.ToString() : "Delivarable not found"); }
private void btnsearchbinary_Click(object sender, EventArgs e) { ts.SortById(); Deliverable d = ts.BinarySearchById(Convert.ToInt32(tbid.Text), 0, ts.SortedList.Count - 1); if (d != null) { MessageBox.Show(d.ToString()); } else { MessageBox.Show("Delivarable not found"); } }