AmitDiwan has Published 10744 Articles

Get a collection of keys in the StringDictionary in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:53:04

137 Views

To get a collection of keys 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 strDict1 = new StringDictionary();       strDict1.Add("U", "Electronics");       strDict1.Add("V", "Toys");     ... Read More

Check if the StringDictionary contains a specific value in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:47:23

140 Views

To check if the StringDictionary contains a specific value, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       StringDictionary strDict1 = new StringDictionary();       strDict1.Add("A", "John");       strDict1.Add("B", "Andy");     ... Read More

Check if the StringDictionary contains a specific key in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:38:54

155 Views

To check if the StringDictionary contains a specific key, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       StringDictionary strDict1 = new StringDictionary();       strDict1.Add("A", "John");       strDict1.Add("B", "Andy");     ... Read More

Check if two SortedSet objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:34:29

214 Views

To check if two SortedSet objects are equal, 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(100);       set1.Add(200);       set1.Add(300);       ... Read More

Check if the Hashtable contains a specific Key in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:30:49

313 Views

To check if Hashtable contains a specific key, the code is as follows −Exampleusing System; using System.Collections; public class Demo {    public static void Main()    public static void Main(){       Hashtable hash = new Hashtable();       hash.Add("One", "Katie");       hash.Add("Two", "John");   ... Read More

Check if Hashtable is read-only in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:26:35

143 Views

To check if Hashtable is read-only, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Hashtable hash = new Hashtable();       hash.Add("One", "Katie");       hash.Add("Two", "John");       hash.Add("Three", "Barry");     ... Read More

Check if the SortedSet contains a specific element in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:23:00

185 Views

To check if the SortedSet contains a specific element, 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("CD");       set1.Add("CD");       set1.Add("CD");     ... Read More

Check if a Stack contains an element in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:16:10

259 Views

To check if a Stack has elements, use the C# Contains() method. Following is the code −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Stack stack = new Stack();       stack.Push(100);       stack.Push(150);       stack.Push(175); ... Read More

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

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:12:05

130 Views

To check if a SortedSet object 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(){       SortedSet set1 = new SortedSet();       set1.Add(10);       set1.Add(20); ... Read More

Check if a SortedSet object is a proper subset of the specified collection in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:03:39

97 Views

To check if a SortedSet object is a proper 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(){       SortedSet set1 = new SortedSet();       set1.Add(20);       set1.Add(40);   ... Read More

Advertisements