对ArrayList 进行深拷贝

            ArrayList arr = new ArrayList();
            arr.Add(new People("A", 10));
            arr.Add(new People("B", 20));
            arr.Add(new People("C", 30));

            ArrayList arr2 = new ArrayList();
            foreach (People p in arr)
            {
                arr2.Add(p.Clone());
            }

 

posted @ 2015-08-11 20:50  niaomingjian  阅读(2846)  评论(0编辑  收藏  举报