//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);
        }
Example #2
0
 //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;
 }