Class Queues
Functions for working with queues.
Inheritance
System.Object
Queues
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Virtlink.Utilib.Collections
Assembly: Virtlink.Utilib.dll
Syntax
public static class Queues
Methods
| Improve this Doc View SourceEnqueueRange<T>(Queue<T>, IEnumerable<T>)
Enqueues a range of elements onto the queue.
Declaration
public static void EnqueueRange<T>(this Queue<T> queue, IEnumerable<T> elements)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Queue<T> | queue | The queue. |
System.Collections.Generic.IEnumerable<T> | elements | The elements to enqueue. |
Type Parameters
Name | Description |
---|---|
T | The type of elements. |
Remarks
The first element is enqueued first.
PeekOrDefault<T>(Queue<T>)
Returns the front element of the queue without removing it; or returns the default value when the queue is empty.
Declaration
public static T PeekOrDefault<T>(this Queue<T> queue)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Queue<T> | queue | The queue. |
Returns
Type | Description |
---|---|
T | The front element of the queue;
or the default value of |
Type Parameters
Name | Description |
---|---|
T | The type of elements. |