Home > Backend Development > C#.Net Tutorial > Deque class in C#

Deque class in C#

王林
Release: 2023-08-27 20:01:05
forward
770 people have browsed it

C# 中的 Deque 类

#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 -

Clear

Clear all elements in the collection

Contains

In the collection Is there an object

ToArray

Use the ToArray() method to copy all elements in the collection into an array.

Synchronization

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template