How to copy an object?
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
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

AdministratorRank #675 · 3.6K reputationPosted Apr 10, 2003, 8:31 PM EDT
AdministratorRank #675 · 3.6K reputationPosted Apr 11, 2003, 5:12 AM EDT
AdministratorRank #675 · 3.6K reputationPosted Apr 12, 2003, 5:29 PM EDT