HI,
I have 2 lists. I want to check if a string exists in both the lists.
I have tried this code, but is there any other way to achieve this:
List<string> Emails = new List<string>();
string oRequestorEmail = "abc@email.com";
foreach (string userEmail in GetUserEmails(olocalgroup))
{
Emails.Add(userEmail);
}
IList<string> uniqueValues = Emails.Distinct().ToList();
StringBuilder str = new StringBuilder();
foreach (string toid in uniqueValues)
{
str.Append(toid + ";");
}
List<string> countryEmails = new List<string>();
foreach (string countryuserEmail in GetUserEmails(oCountrygroup))
{
countryEmails.Add(countryuserEmail);
}
...
Go to the complete details ...