سلام ، اگه تعداد آیتم های دو لیست باکس با هم برابر باشند :
int n = listBox1.Items.Count;//listbox2.items.count is also = n
string str="";
for (int i = 0; i < n; i++)
{
if (listBox1.Items[i].ToString() == listBox2.Items[i].ToString())
continue;
else
str += listBox1.Items[i].ToString() + " , " + listBox2.Items[i].ToString() + "\n";
}
MessageBox.Show(str);
*) اگر تعداد آیتم ها برابر هم نباشند ، باز میشه با حلقه اینکارو انجام داد ولی با یکسری تغییرات !
موفق و پیروز باشید !!!