Try:
private bool functionName(int r, int c)
{
return sList.Any(s => s.L.R == r && s.L.C == c);
}
Any extension method in Linq is applied to the IEnumerable sequence (which may be an example) and returns true if any of the elements in the sequence returns true for the given predicate (in this case, the lambda function s => s.L.R == r && s.L.C == c).
source
share