This snippet below checks if eCode (an integer) is equal to any element in list1<int> and if yes, it does something. My question is the following.. what would be a linq implementation of this? I'm new to C# and Linq and not sure how to proceed.
for (int i = 0; i < list1.Count; i++)
{
if (list1[i] == eCode)
{
// do something
}
}
ifcondition, you shouldn't be using LINQ.