Exemplo n.º 1
0
 public StackQueue(StackQueue <T> other)
 {
     _size  = other._size;
     _top   = other._top;
     _items = new T[_size];
     System.Array.Copy(other._items, _items, _size);
 }
Exemplo n.º 2
0
 public StackQueue(StackQueue <T> other)
 {
     _size  = other._size;
     _top   = other._top;
     _items = new List <T>(_size);
     for (int i = 0; i < _size; ++i)
     {
         _items.Add(default(T));
     }
     _items.AddRange(other._items);
 }