I have list of int A,B. i like to do the following step in linq
list c = new List();
for (int i = 0; i < a.count; i++)
{
for (i
As Chris mentions in his comment on the original question, the sample code provided will return duplicates in list c (see his comment for details). Intersect will only return distinct values. To duplicate the behavior of the original sample code, try this:
var c = (from value in a
where b.Contains(a)
select a);