草庐IT

teamPerformance

全部标签

c# - 将一个二维数组复制到另一个二维数组

我使用这段代码将一个二维数组复制到另一个二维数组:Array.Copy(teamPerformance,0,tempPerformance,0,teamPerformance.Length);但是,当我更改tempPerformance中的一些数据时,这些更改也适用于teamPerformance。我应该怎么做才能控制它? 最佳答案 你需要Clone()double[,]arr={{1,2},{3,4}};double[,]copy=arr.Clone()asdouble[,];copy[0,0]=2;//itreallycopie