EnqueueAll

public static class QueueExtensions
    {
        public static void EnqueueAll<T>(this Queue<T> queue, T[] items)
        {
            foreach (var item in items)
                queue.Enqueue(item);
        }
    }
Example:
queue.EnqueueAll(new string[] 
                {
                    "foo", "bar"
                });

Description

Enqueues an aray of items to a Queue rather than having to loop and call Enqueue for each item.

Details

Double click on the code to select all.

 

;