//shallow copy public object Clone() { Hashtable ht = new Hashtable(); ht.InitializeHashTable(_numberOfBuckets, _maxLoadFactor); ht._count = _count; ht._loadFactor = _loadFactor; Array.Copy(_buckets, ht._buckets, _numberOfBuckets); return(ht); }
//shallow copy public object Clone() { Hashtable ht = new Hashtable(); ht.InitializeHashTable(_numberOfBuckets, _maxLoadFactor); ht._count = _count; ht._loadFactor = _loadFactor; Array.Copy(_buckets, ht._buckets, _numberOfBuckets); return ht; }