The call is ambiguous between two extension methods
Apparently LINQPad is unable to correctly resolve the extension method if it is available either in the same or sub-namespace.
E.g. .net-4.7.1 has recently added the Append extension. I had an extension with the same signature in my own library.
Even though my extension uses the namespace System.Linq.Custom it does not work in LINQPad. There are no problems with it in Visual Studio and there the compiler picks my extension.
This looks like a bug to me.
The exact error message is:
CS0121 The call is ambiguous between the following methods or properties: 'System.Linq.Enumerable.Append<TSource>(System.Collections.Generic.IEnumerable<TSource>, TSource)' and 'System.Linq.Custom.EnumerableExtensions.Append<T>(System.Collections.Generic.IEnumerable<T>, T)'
-
Sam Bosell
commented
I'm wondering the same thing. ServiceStack has a Dump extension method which is ambiguous with LinqPad's.