کد سورس فرم بالا:
checkedListBox1.Items.Clear();
for (int i = 0; i < listBox1.Items.Count; i++)
{
for (int y = 0; y < listBox2.Items.Count; y++)
{
if (y == i)
{
checkedListBox1.Items.Add(listBox1.Items[y]);
checkedListBox1.SetItemChecked(y, true);
}
else
{
checkedListBox1.Items.Add(listBox1.Items[i]);
}
}