Deep Copy in C#

后端 未结 8 643
独厮守ぢ
独厮守ぢ 2021-02-05 20:36

MSDN gives this example of a deep copy (http://msdn.microsoft.com/en-us/library/system.object.memberwiseclone.aspx)

public class Person 
{
    public int Age;
           


        
8条回答
  •  春和景丽
    2021-02-05 21:30

    Your new method does not copy the value of this.Age and this.Name, so i think it's even not called copy.

提交回复
热议问题