AmitDiwan has Published 10744 Articles

Queue.Dequeue Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 09:48:31

815 Views

The Queue.Dequeue() method in C# is used to remove and return the object at the beginning of the Queue.SyntaxThe syntax is as follows −public virtual object Dequeue ();ExampleLet us now see an example − Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {     ... Read More

Queue.Count Property in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 09:42:04

172 Views

The Queue.Count property in C# is used to get the number of elements contained in the Queue.SyntaxThe syntax is as follows −public virtual int Count { get; }ExampleLet us now see an example − Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {     ... Read More

Queue.CopyTo() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 09:37:29

253 Views

The Queue.CopyTo() method in C# is used to copy the Queue elements to an existing one-dimensional Array, starting at the specified array index.SyntaxThe syntax is as follows −public virtual void CopyTo (Array arr, int index);Above, the parameter arr is the one-dimensional Array that is the destination of the elements copied ... Read More

Check if a SortedList object contains a specific value in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:20:54

160 Views

To check if a SortedList object contains a specific value, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       SortedList list = new SortedList();       list.Add("1", "One");       list.Add("2", "Two");       ... Read More

Get an enumerator that iterates through the List in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:18:21

559 Views

To get an enumerator that iterates through the List, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(String[] args){       List list1 = new List();       list1.Add("One");       list1.Add("Two");       list1.Add("Three");   ... Read More

Get the first node of the LinkedList in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:13:04

385 Views

To get the first node of the LinkedList, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       LinkedList list = new LinkedList();       list.AddLast("A");       list.AddLast("B");       list.AddLast("C");       ... Read More

Get an ICollection containing the values in OrderedDictionary in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:08:06

534 Views

To get an ICollection containing the values in OrderedDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       OrderedDictionary dict = new OrderedDictionary();       dict.Add("1", "One");       dict.Add("2", "Two");     ... Read More

Check if a Hashtable is equal to another Hashtable in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:03:47

222 Views

To check if a Hashtable is equal to another Hashtable, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Hashtable hash1 = new Hashtable();       hash1.Add("1", "Kevin");       hash1.Add("2", "Steve");       ... Read More

Check if a HashSet is a subset of the specified collection in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:00:02

126 Views

To check if a HashSet is a subset of the specified collection, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       HashSet set1 = new HashSet();       set1.Add("EF");       set1.Add("OP");       ... Read More

Check if two BitArray objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:55:59

357 Views

To check if two BitArray objects are equal, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       BitArray arr1 = new BitArray(2);       BitArray arr2 = new BitArray(2);       arr1[0] = false;   ... Read More

Advertisements