using System.Collections; using System.Collections.Generic; namespace Model { public class EQueue: IEnumerable { private readonly LinkedList list = new LinkedList(); public void Enqueue(T t) { this.list.AddLast(t); } public T Dequeue() { T t = this.list.First.Value; this.list.RemoveFirst(); return t; } public int Count { get { return this.list.Count; } } public IEnumerator GetEnumerator() { return this.list.GetEnumerator(); } public void Clear() { this.list.Clear(); } } }