Пример #1
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);
        }
Пример #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;
 }