0

I have a Dictionary<int, string[]>. And I want to know, if with the functions of Enumerable/Collection it's possible to get in one line "approximatly", to regroup all string[] value in one array string ?

Dictionary<int, string[]> dicoMailPerPage = new Dictionary<int, string[]>();
dicoMailPerPage.Add(pageX, objetLanda.Select(t => t.mail).ToArray());
...
string[] allMail = dicoMailPerPage.Values.Something... // My problem 

Thanks

I had to look for zip/aggregate... but it's not want i need, i think.

3
  • What programming language is this? Please specify this into a tags. Commented May 2, 2023 at 23:43
  • 2
    And if my assumption is correct and this is C#, then look at the IEnumerable.SelectMany LINQ extension method - dicoMailPerPage.Values.SelectMany(x=>x); Commented May 2, 2023 at 23:49
  • Yes i just see that there a few minutes i'll try with SelectMany thanks. Commented May 3, 2023 at 10:21

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.