Exemple #1
0
        /// <summary>
        /// Creates a deep copy of the collection.
        /// </summary>
        /// <remarks>
        /// Creates a deep copy of the collection.
        /// </remarks>
        public object Clone() {
            XmlElementCollection clone = new XmlElementCollection(this.Count);

            foreach (XmlElement element in this) {
                clone.Add((XmlElement) Utils.Clone(element));
            }

            return clone;
        }
Exemple #2
0
        /// <summary>
        /// Creates a deep copy of the collection.
        /// </summary>
        /// <remarks>
        /// Creates a deep copy of the collection.
        /// </remarks>
        public new object MemberwiseClone()
        {
            XmlElementCollection clone = new XmlElementCollection(this.Count);

            foreach (XmlElement element in this)
            {
                clone.Add((XmlElement)Utils.Clone(element));
            }

            return(clone);
        }