Convert List to Array2D

I am trying to convert one list to multidimensional Array2D. Mostly from [1; 2; 3]to [[1; 2; 3]]. I can’t just use List.toArraybecause I am using an API function that accepts int[,]as one of its inputs.

What is the best way to do this?

+4
source share
1 answer

Just paste the list into another list:

array2D [[1; 2; 3]]

> val it : int [,] = [[1; 2; 3]]
+5
source

Source: https://habr.com/ru/post/1544511/


All Articles