Beispiel #1
0
        /// <summary>
        /// Creates a shallow copy of the <see cref="StringCollectionWithGoodToString" />.
        /// </summary>
        /// <returns>
        /// A shallow copy of the <see cref="StringCollectionWithGoodToString" />.
        /// </returns>
        public virtual object Clone()
        {
            string[] strings = new string[Count];
            CopyTo(strings, 0);
            StringCollectionWithGoodToString clone = new StringCollectionWithGoodToString();

            clone.AddRange(strings);
            return(clone);
        }
Beispiel #2
0
 /// <summary>
 /// Creates a shallow copy of the <see cref="StringCollectionWithGoodToString" />.
 /// </summary>
 /// <returns>
 /// A shallow copy of the <see cref="StringCollectionWithGoodToString" />.
 /// </returns>
 public virtual object Clone() {
     string[] strings = new string[Count];
     CopyTo(strings, 0);
     StringCollectionWithGoodToString clone = new StringCollectionWithGoodToString();
     clone.AddRange(strings);
     return clone;
 }