Get first elements of List <string []> for string [] using LINQ
I have a string array list: List<string[]> myList;
Is there a way to get an array of strings with all elements of string [0]? As List myList for string [] where the elements are myList [string [0]]
I suppose it is something like var result = from x in myList.Take (0) select x
And question 2) is there a way to convert string [] to string [1,] without a for loop? Now I am doing:
for (int i = 0; i < arr.Length; i++)
range[0, i] = arr[i];
I need "this syntax" because I am exporting columns to excel. And I need an object [,] to do range.set_Value(Type, object[,])
.
+3
source to share