AmitDiwan has Published 10740 Articles

Remove all objects from the Queue in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:54:16

150 Views

To remove all objects from 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");       queue.Enqueue("Kevin"); ... Read More

Remove all entries from the ListDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:51:18

128 Views

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

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

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:47:47

144 Views

To check if a HashSet is a proper superset 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(30);       set1.Add(60);     ... Read More

Remove all elements in a collection from a HashSet in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:44:31

167 Views

To remove all elements in a collection from a HashSet, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(String[] args){       HashSet set1 = new HashSet();       set1.Add("Ryan");       set1.Add("Tom");       set1.Add("Andy"); ... Read More

Remove all elements from the SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:40:29

171 Views

To remove all elements from 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");       set1.Add("EF"); ... Read More

Remove a specified item from SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:35:50

169 Views

To remove a specified item from 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");       set1.Add("EF"); ... Read More

Remove a range of elements from the ArrayList in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:32:56

165 Views

To remove a range of elements from the ArrayList, the code is as follows −Exampleusing System; using System.Collections; public class Demo {    public static void Main(String[] args){       ArrayList list1 = new ArrayList();       list1.Add("A");       list1.Add("B");       list1.Add("C");     ... Read More

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

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:29:29

161 Views

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

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

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:25:03

178 Views

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

Remove all elements from the ArrayList in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:22:05

209 Views

To remove all elements from 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");       list1.Add("C");       list1.Add("D"); ... Read More

Advertisements