public static ClassCollectionItem getInstance() { if (instance == null) { instance = new ClassCollectionItem(); } return(instance); }
public override bool Equals(object obj) { if (obj == null || !this.GetType().Equals(obj.GetType())) { return(false); } ClassCollectionItem s = (ClassCollectionItem)obj; return(s.Count == Count); }
public ClassCollectionItem Unite(ClassCollectionItem coll) { ClassCollectionItem united = new ClassCollectionItem(); foreach (Item item in this) { united.Add(item); } foreach (Item item in coll) { if (!this.IsThere(item.NameOfItem)) { united.Add(item); } } return(united); }