AmitDiwan has Published 10740 Articles

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

AmitDiwan

AmitDiwan

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

129 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

162 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

387 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

121 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

193 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

185 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

327 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

Get an ICollection containing the values in HybridDictionary in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 05:59:45

142 Views

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

Get an ICollection containing the keys in ListDictionary in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 05:53:13

114 Views

To get an ICollection containing the keys in 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 listDict = new ListDictionary();       listDict.Add("1", "Laptop");       listDict.Add("2", "Tablet");     ... Read More

Get the number of key/value pairs in the StringDictionary in C#

AmitDiwan

AmitDiwan

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

131 Views

To get the number of key/value pairs in the StringDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       StringDictionary strDict = new StringDictionary();       strDict.Add("1", "One");       strDict.Add("2", "Two");   ... Read More

Advertisements