// Implement the ICloneable<T> interface. public Object Clone() { ArrayQueue <T> queue = (ArrayQueue <T>)MemberwiseClone(); queue.items = (T[])items.Clone(); return(queue); }
// Constructor. public QueueIterator(ArrayQueue <T> queue) { this.queue = queue; position = -1; }