由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - ArrayList??
相关主题
dynamic change before refreshingabout ArrayList
How to check a linked table?如何同步多个程序同时读取一个文件
C# interview question问个best practice
C#问题请教请问arraylist的问题。
c++ managed code 几个问题请教session的问题。
ArrayList如何保存到文件?请教:第一个page产生的arraylist,如何在第二个page调用?
arraylist里面的对象序列化后如何检索?How to change web method's name?
ArrayList questionButton's refresh problem
相关话题的讨论汇总
话题: arraylist话题: alson话题: al话题: content话题: any
进入DotNet版参与讨论
1 (共1页)
c*o
发帖数: 70
1
When I want to add an arrayList's content to another ArrayList,i.e.
al.add(alSon), C# adds the reference of alSon rather than its value to al. Any
one know how to figure it out if I only want to add a content of alSon to al,
and then the content of alSon will be refreshed and added to the al in a loop?
Currently, because the reference of alSon is used, so only duplicated values
of the last asSon are added to al.
Thank you!
ArrayList al=new ArrayList()
ArrayList alSon=new ArrayList()
for (...){
d*r
发帖数: 238
2
al.add(alSon.Clone());

Any
al,
loop?

【在 c*o 的大作中提到】
: When I want to add an arrayList's content to another ArrayList,i.e.
: al.add(alSon), C# adds the reference of alSon rather than its value to al. Any
: one know how to figure it out if I only want to add a content of alSon to al,
: and then the content of alSon will be refreshed and added to the al in a loop?
: Currently, because the reference of alSon is used, so only duplicated values
: of the last asSon are added to al.
: Thank you!
: ArrayList al=new ArrayList()
: ArrayList alSon=new ArrayList()
: for (...){

r***e
发帖数: 38
3
try
al.AddRange(alsSon)

Any
al,
loop?

【在 c*o 的大作中提到】
: When I want to add an arrayList's content to another ArrayList,i.e.
: al.add(alSon), C# adds the reference of alSon rather than its value to al. Any
: one know how to figure it out if I only want to add a content of alSon to al,
: and then the content of alSon will be refreshed and added to the al in a loop?
: Currently, because the reference of alSon is used, so only duplicated values
: of the last asSon are added to al.
: Thank you!
: ArrayList al=new ArrayList()
: ArrayList alSon=new ArrayList()
: for (...){

1 (共1页)
进入DotNet版参与讨论
相关主题
Button's refresh problemc++ managed code 几个问题
麻烦推荐一本VB.NET书?ArrayList如何保存到文件?
Jquery dialog问题请教arraylist里面的对象序列化后如何检索?
asp.net Ajax timer to update panel only but refresh whole page why? Thank you!ArrayList question
dynamic change before refreshingabout ArrayList
How to check a linked table?如何同步多个程序同时读取一个文件
C# interview question问个best practice
C#问题请教请问arraylist的问题。
相关话题的讨论汇总
话题: arraylist话题: alson话题: al话题: content话题: any