Is there a way to convert from List<List<int>> to double[][] using LINQ?
I’ve figured out how to get from List<List<int>> to int[][] but I’m stuck on the cast. Here is what I have so far:
List<List<int>> ints = new List<List<int>>()
{
new List<int>(){0, 1, 2},
new List<int>(){0, 1, 2},
new List<int>(){0, 1, 2},
};
// int[][]
ints.Select(x => x.ToArray()).ToArray();
1 Answer