摘要: public void Test() { var arr1=new[]{1,2,3}; var arr2 = arr1; var arr3 = (int[])arr1.Clone(); //浅拷贝 arr1[0] = 4; //arr2[0]已改变为4,arr3[0]未改变 var arr4 = new[] { new Person(),new Person(),new Person() }; var arr5 = arr4; var arr6 = (Person[])arr4.Clone(); arr4[0].Id = 2; // //arr5[0].Id已改变为"2", 阅读全文
posted @ 2013-07-11 10:13 瓜王 阅读(2702) 评论(0) 推荐(1) 编辑