Skip to content

Tag Archives: CSharp-Collections-Namespace

This method(comes under System.Collections namespace) is used to check whether a specified element is present is Stack or not. Internally this method checks for equality… Read More
This method(comes under System.Collections namespace) is used to remove and returns the object at the top of the Stack. This method is similar to the… Read More
This method(comes under System.Collections namespace) is used to copy the Stack to an existing 1-D Array which starts from the specified array index. The elements… Read More
This method(comes under System.Collections namespace) is used to remove all the objects from the Stack. This method will set the Count of Stack to zero,… Read More
This method(comes under System.Collections namespace) is used to copy a Stack to a new array. The elements are copied onto the array in last-in-first-out (LIFO)… Read More
This method(comes under System.Collections namespace) is used to return the object at the top of the Stack without removing it. This method is similar to… Read More
This method returns an enumerator that iterates through the Queue. And it comes under the System.Collections namespace. Syntax: public virtual System.Collections.IEnumerator GetEnumerator (); Below programs… Read More
This method is used to copy the Queue elements to an existing one-dimensional Array, starting at the specified array index. The elements are copied to… Read More
This property is used get a value which indicates whether access to the Queue is synchronized (thread safe) or not. Syntax: public virtual bool IsSynchronized… Read More
This property is used to get the number of elements contained in the Queue. Retrieving the value of this property is an O(1) operation and… Read More
The Dequeue() method is used to returns the object at the beginning of the Queue. This method is similar to the Peek() Method. The only… Read More
This method is used to add an object to the end of the Queue. This comes under the System.Collections namespace. The value can null and… Read More
This method is used to copy the Queue elements to a new array. The Queue is not modified and the order of the elements in… Read More
This method is used to return a new Queue that wraps the original queue and is thread-safe. The wrapper returned by this method locks the… Read More
This method returns the object at the beginning of the Queue without removing it. This method is similar to the Dequeue method, but Peek does… Read More

Start Your Coding Journey Now!