| Define Peek and Dequeue methods in csharp?
In Queue if we want to find the topmost element of the queue we use below methods provided by Queue class:-
(1)Peek:-This method of queue will returns the object at the beginning of the queue without removing it.
(2)Dequeue:-This method return object at the beginning of the queue with modification which means this method remove the topmost element from the queue. | | |