class Foo
{
int PrimaryItem;
bool HasOtherItems;
IEnumerable<int> OtherItems;
}
List<Foo> fooList;
Comment obtenir une liste de tous les identifiants d'articles référencés fooList
?Fonctionnalité AddRange/concat dans une expression lambda Select
var items = fooList
.Select(
/*
f => f.PrimaryItem;
if (f.HasOtherItems)
AddRange(f => f.OtherItems)
*/
).Distinct();
bonne solution :) – fearofawhackplanet