How to resolve ambiguous ZIP call between Enumerable and MoreLINQ?
You can create a wrapper class with the same method, but diffrent name. It's a bit dirty, but if you really like to have extension syntax, that is the only way.
public static class MoreLinqWrapper
{
public static IEnumerable<TResult> MlZip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
{
return MoreLinq.Zip(first, second, resultSelector);
}
}
A way to make it compile would be:
var students = new[] { "Mark", "Bob", "David", "test" }.AsQueryable();
var colors = new[] { "Pink", "Red", "Blue" };
students
.Zip(colors, (s, c) => s + c)
.Dump();
The students
object has to be converted to an IQueryable
object.