Possible Duplicate:
Is there a built-in method to compare collections in C#?
Comparing two collections for equality
I have tow collections that i want to check to see if the values contained within are not eqaul.
SearchResultCollection Users1 = ds1.FindAll();
SearchResultCollection Users2 = ds2.FindAll();
Next i use 2 foreach loops to iterate through and then assign the variables.
foreach (SearchResult users in Users1)
{
string ManagerID = users.Properties["OrgUnitManagerName"][0].ToString();
string subGroup = users.Properties["EmployeeSubGroup"][0].ToString();
string cn = users.Properties["cn"][0].ToString();
foreach (SearchResult user in Users2)
{
string uid = absaUser.Properties["uid"][0].ToString();
}
}
What i want to do is: check which users from User1 that do not exixt in user2 and print out that list.
if(cn != uid)
{
}
This doesnt seem to work. Any Ideas?