AmitDiwan has Published 10740 Articles

Check if a SortedList object contains a specific value in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:20:54

180 Views

To check if a SortedList object contains a specific value, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       SortedList list = new SortedList();       list.Add("1", "One");       list.Add("2", "Two");       ... Read More

Get an enumerator that iterates through the List in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:18:21

578 Views

To get an enumerator that iterates through the List, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(String[] args){       List list1 = new List();       list1.Add("One");       list1.Add("Two");       list1.Add("Three");   ... Read More

Get the first node of the LinkedList in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:13:04

408 Views

To get the first 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 OrderedDictionary in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:08:06

565 Views

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

Check if a Hashtable is equal to another Hashtable in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:03:47

245 Views

To check if a Hashtable is equal to another Hashtable, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Hashtable hash1 = new Hashtable();       hash1.Add("1", "Kevin");       hash1.Add("2", "Steve");       ... Read More

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

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 08:00:02

148 Views

To check if a HashSet is a 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(){       HashSet set1 = new HashSet();       set1.Add("EF");       set1.Add("OP");       ... Read More

Check if two BitArray objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 07:55:59

393 Views

To check if two BitArray objects are equal, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       BitArray arr1 = new BitArray(2);       BitArray arr2 = new BitArray(2);       arr1[0] = false;   ... Read More

Get a collection of keys in the StringDictionary in C#

AmitDiwan

AmitDiwan

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

159 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

163 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

177 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

Advertisements