예제 #1
0
        // Token: 0x060002BA RID: 698 RVA: 0x000078A8 File Offset: 0x000068A8
        public virtual object Clone()
        {
            WriteableDictionary   writeableDictionary = (WriteableDictionary)base.MemberwiseClone();
            Hashtable             hashtable           = new Hashtable();
            IDictionaryEnumerator enumerator          = this.m_dictionary.GetEnumerator();

            while (enumerator.MoveNext())
            {
                hashtable.Add(Convert.Clone(enumerator.Key), Convert.Clone(enumerator.Value));
            }
            writeableDictionary.m_dictionary = hashtable;
            return(writeableDictionary);
        }
예제 #2
0
        /// <summary>
        /// Creates a deep copy of the collection.
        /// </summary>
        public virtual object Clone()
        {
            WriteableDictionary clone = (WriteableDictionary)this.MemberwiseClone();

            // clone contents of hashtable.
            Hashtable dictionary = new Hashtable();

            IDictionaryEnumerator enumerator = m_dictionary.GetEnumerator();

            while (enumerator.MoveNext())
            {
                dictionary.Add(Opc.Convert.Clone(enumerator.Key), Opc.Convert.Clone(enumerator.Value));
            }

            clone.m_dictionary = dictionary;

            // return clone.
            return(clone);
        }