Пример #1
0
 public DogsContainer(DogsContainer container) : this()
 {
     for (int i = 0; i < container.Count; i++)
     {
         this.Add(container.Get(i));
     }
 }
Пример #2
0
        public DogsContainer Intersect(DogsContainer other)
        {
            DogsContainer result = new DogsContainer();

            for (int i = 0; i < this.Count; i++)
            {
                Dog current = this.dogs[i];
                if (other.Contains(current))
                {
                    result.Add(current);
                }
            }
            return(result);
        }
 public Branch(string town)
 {
     Town = town;
     Dogs = new DogsContainer(MaxNumberOfDogs);
 }