Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 467
hrh Avatar asked Apr 30 '12 16:04

hrh


People also ask

What does << mean in C?

<< is the left shift operator. It is shifting the number 1 to the left 0 bits, which is equivalent to the number 1 .

What does %d do in C?

%d is a format specifier, used in C Language. Now a format specifier is indicated by a % (percentage symbol) before the letter describing it. In simple words, a format specifier tells us the type of data to store and print. Now, %d represents the signed decimal integer.


1 Answers

No.

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

like image 118
Domenic Avatar answered Sep 19 '22 08:09

Domenic