日期:2014-05-18 浏览次数:20950 次
this.checkedListBox1.Items.Clear(); foreach (char s in "abigcat") { this.checkedListBox1.Items.Add(s); } string strValue = "abc"; for (int i = 0; i < this.checkedListBox1.Items.Count; i++) { string chkValue = this.checkedListBox1.Items[i].ToString(); if (strValue.IndexOf(chkValue) >= 0) { this.checkedListBox1.SetItemChecked(i, true); } }