EnqueueAll

/// <summary>
/// Extensions to the <see cref="Queue{T}"/> class.
/// </summary>
public static class QueueExtensions
{
    /// <summary>
    /// Enqueues all the specified objects.
    /// </summary>
    /// <typeparam name="T">The type of objects in the queue.</typeparam>
    /// <param name="queue">The queue.</param>
    /// <param name="items">The items to enqueue.</param>
    public static void EnqueueAll<T>(this Queue<T> queue, IEnumerable<T> items)
    {
        foreach (var item in items)
            queue.Enqueue(item);
    }
}
Example:
Queue<string> queue = new Queue<string>();
queue.EnqueueAll(new string[]{"A", "B", "C"});

Description

Enqueues all objects from an IEnumerable<T> to the specified queue.

Details

Double click on the code to select all.

 

;