The code
public static IEnumerable<string> IfMatchWith(this IEnumerable<string> myList, string itemToMatch)
{
foreach (var item in myList.Where(item => item == itemToMatch))
yield return item;
}
could be rewritten as:
public static IEnumerable<string> IfMatchWith(this IEnumerable<string> myList, string itemToMatch)
{
return myList.Where(item => item == itemToMatch);
}
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.