public static IEnumerable <T> Enum <T>(this IQueue <T> queue) { if (queue == null) { return(null); } var iqclone = queue.Clone(); var list = new List <T>(); var it = iqclone.Dequeue(); do { list.Add(it); it = iqclone.Dequeue(); }while (iqclone.Count > 0); return(list); }