I have an ILookup<Type, (int, string, BitmapSource)>
which is supposed to store display information for elements (that otherwise only exist as enums in the application) in a dropdown.
The Tuples are accessed like this:
public IEnumerable<(int, string, BitmapSource)> EnumerationValues(Type type)
{
return this._enumerationValues
.Where(group => group.Key == type)
.Select(group => group.SelectMany<(int, string, BitmapSource),
(int, string, BitmapSource)>(element => element));
}
However, the compiler complains about this:
Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type.
Even writing element => (element.Item1, element.Item2, element.Item3)
causes the same error. What am I doing wrong here, the types are exactly the same.