A question about comparing List<T>
- by Varyanica
i have two lists:
List<comparerobj> list_c = new List<comparerobj>();
List<comparerobj> list_b = new List<comparerobj>();
i'm filling lists somehow
then i'm trying to find elements in list_b which list_c doesnt contain:
foreach (comparerobj b in list_b)
{
bool lc = !list_c.Contains(b);
if (lc != true)
{
data.Add(b);
}
}
but for any b i'm getting that lc = true. what am i doing wrong?