using System.Collections.Generic;
public static void Main()
var myQueue = new MyQueueList<int>();
while (myQueue.Count > 0)
Console.Write(myQueue.Dequeue());
public class MyQueueList<T>
public int Count { get; private set; }
throw new InvalidOperationException();
_list[_head] = default(T);
_head = (_head + 1) % _list.Count;
public void Enqueue(T item)
throw new InvalidOperationException();