Created
June 18, 2014 11:07
-
-
Save alfredodev/48367b4c643295383df6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class LinqExtensions | |
| { | |
| public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, bool> predicate) | |
| { | |
| return source.Distinct(new PredicateEqualityComparer<TSource>(predicate)); | |
| } | |
| public static IEnumerable<TSource> OrderBy<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, bool> predicate) | |
| { | |
| return source.OrderBy(new PredicateEqualityComparer<TSource>(predicate)); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment