AmitDiwan has Published 10744 Articles

Get an ICollection containing the values in HybridDictionary in C#

AmitDiwan

AmitDiwan

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

122 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

103 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

113 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

Get the number of key/value pairs contained in ListDictionary in C#

AmitDiwan

AmitDiwan

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

115 Views

To get the number of key/value pairs contained 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 dict1 = new ListDictionary();       dict1.Add("A", "Books");       dict1.Add("B", "Electronics");     ... Read More

Removing first occurrence of specified value from LinkedList in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 05:37:47

293 Views

To remove the first occurrence of specified value from 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

Removing first occurrence of object from Collection in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 05:32:14

120 Views

To remove the first occurrence of the object from Collection, the code is as follows −Example Live Demousing System; using System.Collections.ObjectModel; public class Demo {    public static void Main(){       Collection col = new Collection();       col.Add("Andy");       col.Add("Kevin");       col.Add("John");   ... Read More

Remove a range of elements from the List in C#

AmitDiwan

AmitDiwan

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

464 Views

To remove a range of elements from 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

Remove the specified element from a HashSet in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 05:23:44

416 Views

To remove the specified element from a HashSet, 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("AB");       set1.Add("CD");       set1.Add("EF");       ... Read More

Add key and value into OrderedDictionary collection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:24:33

176 Views

To add key and value into OrderedDictionary collection, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main() {       OrderedDictionary dict1 = new OrderedDictionary();       dict1.Add("A", "Books");       dict1.Add("B", "Electronics");     ... Read More

Add element to SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:20:35

165 Views

To add element to 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(100);       set1.Add(200);       set1.Add(300);       set1.Add(400);   ... Read More

Advertisements