Check of two list have colliding element?

Viewed 8127

Is there a way to check if one list collides with another? ex:

    bool hit=false;
    foreach(var s in list2)
    {
        if (list1.Contains(s))
        {
            hit = true;
            break;
        }
    }
    if (!hit)
    {
3 Answers
Related