AmitDiwan has Published 10744 Articles

Convert Queue To array in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:44:18

348 Views

To convert queue to the array, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Queue queue = new Queue();       queue.Enqueue(100);       queue.Enqueue(200);       queue.Enqueue(300);       queue.Enqueue(400);   ... Read More

Get the number of elements contained in the Queue in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:39:22

200 Views

To get the number of elements contained in the Queue, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Queue queue = new Queue();       queue.Enqueue("Gary");       queue.Enqueue("Jack");       queue.Enqueue("Ryan"); ... Read More

Get the number of elements contained in SortedList in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:32:18

102 Views

To get the number of elements contained in the SortedList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args){       SortedList sortedList = new SortedList();       sortedList.Add("A", "1");       sortedList.Add("B", "2");     ... Read More

Get the number of elements actually contained in the ArrayList in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:25:55

114 Views

To get the number of elements actually contained in the ArrayList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args){       ArrayList list1 = new ArrayList();       list1.Add("A");       list1.Add("B");       ... Read More

Get the minimum value in the SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:21:36

140 Views

To get the minimum value in the SortedSet, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       SortedSet set1 = new SortedSet();       set1.Add("AB");       set1.Add("BC");       set1.Add("CD");       ... Read More

Get an enumerator that iterates through the Hashtable in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:18:12

356 Views

To get an enumerator that iterates through the Hashtable, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Hashtable hash = new Hashtable(10);       hash.Add("1", "A");       hash.Add("2", "B");       hash.Add("3", ... Read More

Removing all entries from HybridDictionary in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:13:35

96 Views

To remove all entries from HybridDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       HybridDictionary dict1 = new HybridDictionary();       dict1.Add("A", "Books");       dict1.Add("B", "Electronics");       dict1.Add("C", "Smart ... Read More

Remove all objects from the Stack in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:10:26

164 Views

To remove all objects from the Stack, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Stack stack = new Stack();       stack.Push("A");       stack.Push("B");       stack.Push("C");       stack.Push("D"); ... Read More

Get the maximum value in the SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:07:33

165 Views

To get the maximum value in the SortedSet, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       SortedSet set1 = new SortedSet();       set1.Add("AB");       set1.Add("BC");       set1.Add("CD");       ... Read More

Get the last node of the LinkedList in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:03:45

298 Views

To get the last 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

Advertisements