DoubleEndedQueue<T> Class
Represents a growable double-ended queue.
public sealed class DoubleEndedQueue<T> : ICollection<T>, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, IEnumerableType parameters
T
Nested types
| Name | Description |
|---|---|
| DoubleEndedQueue<T>.Enumerator |
Constructors
| Name | Description |
|---|---|
| DoubleEndedQueue(int) | Initializes a new instance of DoubleEndedQueue<T> with the specified initial capacity. |
DoubleEndedQueue(int)
DoubleEndedQueue.csInitializes a new instance of DoubleEndedQueue<T> with the specified initial capacity.
public DoubleEndedQueue(int capacity)Parameters
capacityint
Properties
| Name | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. |
| System.Collections.Generic.ICollection<T>.IsReadOnly |
Count
DoubleEndedQueue.csSystem.Collections.Generic.ICollection<T>.IsReadOnly
DoubleEndedQueue.csIndexers
| Name | Description |
|---|---|
| this[int] | Gets the item at the specified index. |
this[int]
DoubleEndedQueue.csMethods
| Name | Description |
|---|---|
| AddFirst(T) | Adds an item at the beginning of the collection. |
| AddLast(T) | Adds an item at the end of the collection. |
| Clear() | |
| Contains(T) | |
| CopyTo(T[], int) | |
| GetEnumerator() | |
| IndexOf(T) | |
| RemoveFirst() | Removes and returns the first item. |
| RemoveLast() | Removes and returns the last item. |
| System.Collections.Generic.ICollection<T>.Add(T) | |
| System.Collections.Generic.ICollection<T>.Remove(T) | |
| System.Collections.Generic.IEnumerable<T>.GetEnumerator() | |
| System.Collections.IEnumerable.GetEnumerator() |
AddFirst(T)
DoubleEndedQueue.csAddLast(T)
DoubleEndedQueue.csClear()
DoubleEndedQueue.cspublic void Clear()No documentation is available.
Contains(T)
DoubleEndedQueue.csCopyTo(T[], int)
DoubleEndedQueue.csGetEnumerator()
DoubleEndedQueue.cspublic DoubleEndedQueue<T>.Enumerator GetEnumerator()No documentation is available.
IndexOf(T)
DoubleEndedQueue.csRemoveFirst()
DoubleEndedQueue.csRemoves and returns the first item.
public T RemoveFirst()Returns
T
RemoveLast()
DoubleEndedQueue.csRemoves and returns the last item.
public T RemoveLast()Returns
T