Reputation: 16672
I would like to concatenate items of two lists of same length to an anonymous type, first list objects are of type 'object', second list objects are enumeration values.
Example of their content :
When run, 'list' has no items.
var enumerable = game.Items.Join(game.ItemsElementName, s => s, t => t,
(item, itemName) => new { Item = item, ItemName = itemName });
var list = enumerable.ToList();
I've tried the second overload of Join() with a predicate but I couldn't implement it as there was hardly anything to compare between an object and an enumeration.
How can merge the contents of these two lists with Join ? if possible at all
Upvotes: 1
Views: 62