{
foreach (T match in list)
if (match.Equals(value))
return true;
return false;
}
Description
The following code is indicated as incorrect by ReSharper, but compiles fine:
private static bool ValueIsInList<T>(T value, IEnumerable<T> list)
{
foreach (T match in list)
if (match.Equals(value))
return true;
return false;
}