EnqueueRange

public static void EnqueueRange<T>(this Queue<T> queue, IEnumerable<T> collection) 
{
	foreach (T item in collection)
		queue.Enqueue(item);
}
Example:
var queue = new Queue<string>();
var list = new List<string>() { "aaa", "bbb" };
queue.EnqueueRange(list);

Description

Enqueues a generic collection of items

Details

  • Author: David Seff
  • Submitted on: 7/19/2016 7:16:18 PM
  • Language: C#
  • Type: void
  • Views: 645

Double click on the code to select all.

 

;