AmitDiwan has Published 10740 Articles

Remove the element with the specified key from the Hashtable in C#

AmitDiwan

AmitDiwan

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

164 Views

To remove the element with the specified key from 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");     ... Read More

How to get Fifth Element of the Tuple in C#?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:03:47

130 Views

To get the fifth element of the Tuple, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main(String[] args){       var tuple1 = Tuple.Create(75, 200, 500, 700, 100, 1200, 1500);       var tuple2 = Tuple.Create(75, 200, 500, 700, 100, ... Read More

Getting an enumerator that iterates through LinkedList in C#

AmitDiwan

AmitDiwan

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

937 Views

To get an enumerator that iterates through 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 the number of elements in the SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:56:50

151 Views

To get the number of elements 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 number of elements contained in the Stack in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:52:50

251 Views

To get the number of elements contained in 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");   ... Read More

Add an object to the end of the Queue - Enqueue Operation in C#

AmitDiwan

AmitDiwan

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

236 Views

To add an object to the end of 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("Electronics");       queue.Enqueue("Accessories");       queue.Enqueue("Toys");   ... Read More

Convert Stack to array in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:46:53

440 Views

To convert stack to the array, 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("AB");       stack.Push("CD");       stack.Push("FG");       stack.Push("KL");   ... Read More

Convert Queue To array in C#

AmitDiwan

AmitDiwan

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

365 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

216 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

120 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

Advertisements