c#ArrayList问题 [英] c# ArrayList Question

查看:101
本文介绍了c#ArrayList问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法断开连接 a重建来自它的源AL的对象的ArrayList;我以为我理解了复制AL数据对象与克隆对象的规则。方法(它只是对原始ArrayList的引用)。代码如下所示:

I can''t seem to "disconnect" a "rebuilt" ArrayList of objects from it''s source AL; I thought I understood the rules on copying AL Data objects vs. the "clone" Method (and it''s simply being a reference to the original ArrayList). The code looks like:

展开 | 选择 | Wrap | 行号

推荐答案


我似乎无法断开连接 a重建来自它的源AL的对象的ArrayList;我以为我理解了复制AL数据对象与克隆对象的规则。方法(它只是对原始ArrayList的引用)。代码如下所示:
I can''t seem to "disconnect" a "rebuilt" ArrayList of objects from it''s source AL; I thought I understood the rules on copying AL Data objects vs. the "clone" Method (and it''s simply being a reference to the original ArrayList). The code looks like:
展开 | 选择 | Wrap | 行号


是的,frinny是对的。并不是说ArrayList是funnny,因为它是对象的正常行为。


考虑:
Yea, frinny is right. It''s not so much that the ArrayList is being funnny as it is normal behaviour for objects.

Consider:
展开 | 选择 | Wrap | 行号


谢谢,但我如何克隆对象?加上它吗?
Thanks, but how do I "clone the object" while add ing it?


这篇关于c#ArrayList问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆