How to get 1D column array and 1D row array from 2D array? (C# .NET)
问题 i have double[,] Array; . Is it possible to get something like double[] ColumnArray0 = Array[0,].toArray() and double[] RowArray1 = Array[,1].toArray() without making a copy of every elemet(using for)? Thanks. 回答1: Arrays are a memory area where all entries are stored in a consecutive way. Depending on the data layout in memory this is only possible for either rows or columns. Instead of the 2d array double[,] type it is in your case better to use an array of arrays double[][] double[][]