C# Beginner to advanced - Lesson 53 - Collections - Part 3 - Queue

مجله خبری، آموزشی پرشین تک
منتشر شده در 11 خرداد 1397

Queues:

The Queue stores the values in FIFO (First in First out) style. The element which is added first will come out First.

Use the Enqueue() method to add elements into Queue

The Dequeue() method returns and removes elements from the beginning of the Queue. Calling the Dequeue() method on an empty queue will throw an exception.

The Peek() method always returns top most element.

دیدگاه کاربران