AmitDiwan has Published 10740 Articles

Remove elements from a SortedSet that match the predicate in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 10:38:23

333 Views

To remove elements from a SortedSet that match the predicate, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    private static bool demo(int i) {       return ((i % 10) == 0);    }    public static void Main(String[] args) {   ... Read More

Remove elements from a HashSet with conditions defined by the predicate in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 10:34:20

334 Views

To remove elements from a HashSet with conditions defined by the predicate, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    private static bool demo(int i) {       return (i == 100);    }    public static void Main(String[] args) {   ... Read More

Remove element at specified index of Collection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 10:26:35

200 Views

To remove element at specified index of 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

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

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 10:07:08

331 Views

To get second 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

C# Check if HybridDictionary is read only

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 09:58:15

113 Views

To check if HybridDictionary is read only, 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");       ... Read More

Get an ICollection containing the keys in HybridDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 08:09:38

119 Views

To get an ICollection containing the keys 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 enumerator that iterates through the SortedDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 08:06:48

157 Views

To get an enumerator that iterates through the SortedDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Generic; public class Demo {    public static void Main(){       SortedDictionarysortedDict = new SortedDictionary();       sortedDict.Add(100, "Mobile");       sortedDict.Add(200, "Laptop");       ... Read More

Get an enumerator that iterates through the ListDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 08:03:44

164 Views

To get an enumerator that iterates through 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");     ... Read More

Get an ICollection containing the values in ListDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 08:00:18

159 Views

To get an ICollection containing the values 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 an enumerator that iterates through the HybridDictionary in C#

AmitDiwan

AmitDiwan

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

137 Views

To get an enumerator that iterates through the 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");     ... Read More

Advertisements