Why doesn\'t ICloneable
\'s Clone
method return a deep copy?
Here is some sample code:
class A : ICloneable
{
public int
Array.Copy copies the values of the array, in this case, references. There is nothing in the documentation of Array.Copy() that indicates a check for classes that implement IClonable and call Clone() instead. You will need to loop through the array and call Clone() yourself.
BTW, yes, IClonable kind of sucks.