I have a problem overloading an extension method.
I have two extension Methods:
Method A - For standard objects:
public static bool HasChanged<T>(this T obj1, T obj2, Func<T, T, bool> equalityExpression)
Method B - For IEnumerables:
public static bool HasChangedList<T>(this IEnumerable<T> obj1, IEnumerable<T> obj2, Func<T, T, bool> isEqualExpression)
But I would like to give them both the same names, that is currently not working, cause IEnumerables are objects aswell, so the compiler isnt able to decide whether to use the first one or the second one on an IEnumerable.
I am sure, its not possible to let first method take all object but an IEnumerable, so is there another way around?