I\'ve got a list of People that are returned from an external app and I\'m creating an exclusion list in my local app to give me the option of manually removing people from the
I couldn't figure out how to do this in pure MS LINQ, so I wrote my own extension method to do it:
public static bool In(this T objToCheck, params T[] values)
{
if (values == null || values.Length == 0)
{
return false; //early out
}
else
{
foreach (T t in values)
{
if (t.Equals(objToCheck))
return true; //RETURN found!
}
return false; //nothing found
}
}