c# assign 1 dimensional array to 2 dimensional array syntax

前端 未结 4 1579
孤街浪徒
孤街浪徒 2021-02-07 10:10

I want to do something like:

object[] rowOfObjects = GetRow();//filled somewhere else
object[,] tableOfObjects = new object[10,10];

tableOfObjects[0] = rowOfObj         


        
4条回答
  •  -上瘾入骨i
    2021-02-07 10:27

    if I have gigabyte size arrays, I would do it in C++/CLI playing with pointers and doing just memcpy instead of having gazillion slow boundary-checked array indexing operations.

提交回复
热议问题