Create new array using content of other arrays in C#

arrays, c#

Solution

string[] ASIA = new []{ Taiwan, Vietnam, Korea, China, Japan}
                      .SelectMany(s => s)  // not entirely sure what these abbreviations are...
                      .ToArray();

Problem

I would like to know the most efficient way of creating new arrays from the content of other arrays. I have several arrays of strings of the type: ``` public readonly string[] Taiwan = { "TW", "TWO" }; public readonly string[] Vietnam = { "HM", "HN", "HNO" }; public readonly string[] Korea = { "KQ", "KS" }; public readonly string[] China = { "SS", "SZ" }; public readonly string[] Japan = { "T", "OS", "NG", "FU", "SP", "Q", "OJ", "JNX", "IXJ", "KAB", "JA", "JPx" }; ``` It would be possible to create now a new array of string in a similar way to this? ``` public readonly string[] ASIA = { Taiwan, Vietnam, Korea, China, Japan}; ``` That would contain all the strings included in the other arrays.

Original source