Beispiel #1
0
 /// <summary>
 /// Populates the passed collection by cloning each item from the existing list.
 /// </summary>
 /// <param name="copyInstance">The copy instance.</param>
 public void CopyTo(AbstractList <ItemType, ListType> copyInstance)
 {
     foreach (ItemType item in this)
     {
         ItemType newItem = item.Clone();
         copyInstance.Add(newItem);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Populates the existing collection by cloning each item from the passed list.
 /// </summary>
 /// <param name="copyInstance">The copy instance.</param>
 public void CopyFrom(AbstractList <ItemType, ListType> copyInstance)
 {
     foreach (ItemType item in copyInstance)
     {
         ItemType newItem = item.Clone();
         Add(newItem);
     }
 }