I using Microsoft.Office.Interop.Excel
I get returned a 2D array of type object[,]
which contains double
for elements. Note that the index lower bound is 1
instead of the default 0
, but I can deal with that easily.
How can nicely convert the array into double[,]
using .NET 3.5. (by nicely I mean concise, or compact).
Note that
double[] values_2 = values.Cast<double>().ToArray();
does work, but it flattens by array into a 1D structure.