In c# does Array.ToArray() perform a DEEP copy?

不打扰是莪最后的温柔 提交于 2019-12-10 13:38:36

问题


This should be a pretty basic question, but I've been having a little trouble finding a definite answer.

When you have an array of values and you use the .ToArray() method does it create a deep or shallow copy of the array?


回答1:


No.

You can easily verify this by writing a small program to test.



来源:https://stackoverflow.com/questions/10387415/in-c-sharp-does-array-toarray-perform-a-deep-copy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!