public void ClearTest () { ComboBox.ObjectCollection col = new ComboBox.ObjectCollection (new ComboBox ()); col.Add ("Item1"); col.Add ("Item2"); col.Clear (); Assert.AreEqual (0, col.Count, "#D1"); }
private void cmbOperator_SelectedIndexChanged(object sender, EventArgs e) { ComboBox.ObjectCollection rows = new ComboBox.ObjectCollection(cmbMobileNumberPrefix); rows.Clear(); if (cmbOperator.SelectedItem.ToString() == "Bakcell") { //bakcell de prefix yalniz bir denedir rows.Add("55"); cmbMobileNumberPrefix.SelectedItem = "55"; } else { rows.Add("50"); rows.Add("51"); cmbMobileNumberPrefix.SelectedItem = "50"; } }