3
Answers

How to copy an object?

Administrator

Administrator

21y
1.8k
1
I want to copy the contents of a hashtable to another hashtable. I tried the following ways: //ht1, ht2 are two hashtables 1. ht1=ht2; 2. ht1=new Hashtable(); ht1=ht2; In both ways, the reference is copied, instead of the data. Are there any way that I can copy it? Thanks a lot
Answers (3)