假设提供的值列表是List valueList
public static void SetCheck(CheckedListBox cblItems, List valueList)
{
foreach (string str in valueList)
{
for (int i = 0; i < cblItems.Items.Count; i++)
{
if (cblItems.GetItemText(cblItems.Items[i]) == str)
{
cblItems.SetItemChecked(i, true);
}
}
}
}