Пример #1
0
        /// <summary>
        /// Duplicates the whole sack contents
        /// </summary>
        /// <returns>Sack instance of the duplicate sack</returns>
        public SackCollection Duplicate()
        {
            SackCollection newSack = new SackCollection();

            foreach (Item item in this)
            {
                newSack.AddItem(item.Clone());
            }

            return(newSack);
        }
Пример #2
0
 /// <summary>
 /// Creates an empty sack
 /// </summary>
 public void CreateEmptySack()
 {
     this.sack            = new SackCollection();
     this.sack.IsModified = false;
 }