Код: Выделить всё
Dictionary test = new()
{
{ "animal", ["cat", "dog"] },
{ "fruit", ["banana", "apple"] }
};
Код: Выделить всё
test.SelectMany(x => x.Value);
Код: Выделить всё
["cat", "dog", "banana", "apple"]
Код: Выделить всё
[("animal", "cat"), ("animal", "dog"), ("fruit", "banana"), ("fruit", "apple")]
Подробнее здесь: https://stackoverflow.com/questions/787 ... with-lists