/// <summary> /// Adds the elements of another ItemsCollection to the end of this ItemsCollection. /// </summary> /// <param name="items"> /// The ItemsCollection whose elements are to be added to the end of this ItemsCollection. /// </param> public virtual void AddRange(ItemsCollection items) { foreach (Item item in items) { this.List.Add(item); } }
public Item() { Name = string.Empty; Quantity = 0; SubItems = new ItemsCollection(); Parent = null; Region = null; Color = Color.Empty; }
/// <summary> /// Initializes a new instance of the ItemsCollection class, containing elements /// copied from another instance of ItemsCollection /// </summary> /// <param name="items"> /// The ItemsCollection whose elements are to be added to the new ItemsCollection. /// </param> public ItemsCollection(ItemsCollection items) { this.AddRange(items); }
public Enumerator(ItemsCollection collection) { this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator(); }