I have this list
// sample data
List<string[]> ListOfArrays = new List<string[]> { new string[]{ "key1", "key2", "key3" },
new string[]{ "value1", "value2", "value3" },
new string[]{ "item1", "item2", "item3" , "item4"} };
i want to join all paralleled indexes in the array with comma delimited string, this will result in converting List<string[]> to string[]
The expected result
// expected result
string[] joinedList = new string[] { "key1, value1, item1",
"key2, value2, item2",
"key3, value3, item3",
"item4"};
is there a simple way to do this ? something like
string[] string.JoinMultiple(string delimiter, List<string[]>);
in the above case could be used like
string[] joinedList = string.JoinMultiple(",", ListOfArrays);
i've been searching a lot to find a solution for this but with no hope.