2010-07-12 87 views

回答

0

Array.Copy

(但要注意,它会在幕后进行循环,就这样最佳)。

Example

+0

lol ...在你做完51之前刚刚找到了它......我喜欢这个功能,但是我更喜欢循环,因为我可以解决它们的需求。 – 2010-07-12 05:06:38

-1
// Copies the last two elements from the Object array to the Int32 array. 
    Array::Copy(myObjArray, myObjArray->GetUpperBound(0) - 1, myIntArray, myIntArray->GetUpperBound(0) - 1, 

查找:http://msdn.microsoft.com/en-us/library/system.array.copy%28VS.71%29.aspx

Array.Copy(myIntArray,myIntArray.GetLowerBound(0),myObjArray,myObjArray.GetLowerBound(0),1);

+3

这是用C++编写的,而不是C#。 – 2010-07-12 05:08:03

+0

对不起,快速审查....虽然类似的解决方案和性质。 – 2010-07-12 05:34:45

相关问题