You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interestingly, source.ToHashSet(comparer) is ambiguous, but source.ToHashSet() is not.
This is because Linq actually has two distinct overloads (one with the comparer parameter, one without), whereas Linq.Extras has only one, with an optional comparer parameter.
If the comparer is not specified, the compiler selects the overload without the comparer parameter over the one with an optional comparer parameter.
Linq.Extras has a
ToHashSet
method, but an identical method was introduced in Linq in the following TFMs:This causes an ambiguity when both the
System.Linq
andLinq.Extras
namespaces are imported.New targets should be added that exclude this method:
The text was updated successfully, but these errors were encountered: