I have a class in my code that is already deriving from IEnumerable. I was wondering if there is a way that I can use a \"Contains\" method on its instnaces to look for a so
public static bool Contains(this IEnumerable source, T value) { foreach (var i in source) { if (Equals(i, value)) return true; } return false; }
If you want, you can add custom comparer as parameter ti extension method Contains