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

2019-06-20 02:13发布

问题:

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.