Home >Backend Development >C#.Net Tutorial >Deque class in C#
#The Deque class uses a doubly linked list to implement its collection of elements. A doubly linked list should have two nodes, the front node and the back node. This helps add elements to the front and back of the Deque.
Using the Deque class you can add and remove elements from both sides. That's why Deque is called double-ended queue.
The Deque class has the following methods in the Queue class -
In the collection Is there an object
Use the ToArray() method to copy all elements in the collection into an array.
Synchronization wrapper for A collection
The above is the detailed content of Deque class in C#. For more information, please follow other related articles on the PHP Chinese website!