AmitDiwan has Published 10744 Articles

Intersection of SortedSet with a collection in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:58:58

146 Views

To get the intersection of SortedSet with a Collection, the code is as follow −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

Insert into OrderedDictionary with key and value at specified index in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:53:56

331 Views

To insert into OrderedDictionary with key and value at specified index, 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("A", "Books");       dict.Add("B", "Electronics"); ... Read More

Insert at the specified index in StringCollection in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:48:14

161 Views

To insert at the specified index in StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main(){       StringCollection strCol = new StringCollection();       strCol.Add("Accessories");       strCol.Add("Books");       strCol.Add("Electronics");       ... Read More

Insert an element into Collection at specified index in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:45:10

369 Views

To insert an element into Collection at the specified index, 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("Laptop");       col.Add("Desktop");       col.Add("Notebook");   ... Read More

Insert a new entry in OrderedDictionary with specified key and value in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:41:26

118 Views

To insert a new entry in OrderedDictionary with specified key and value, 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", ... Read More

Getting last value in MySQL group concat?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:39:32

711 Views

To get last value in group concat, use SUBSTRING_INDEX(). Let us first create a table −mysql> create table DemoTable1525    -> (    -> ListOfSubjects text    -> ); Query OK, 0 rows affected (1.13 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1525 values('MongoDB, C'); ... Read More

Check whether an element is contained in the ArrayList in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:38:41

191 Views

To check whether an element is contained in the ArrayList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       ArrayList list = new ArrayList();       list.Add("One");       list.Add("Two");       list.Add("Three");   ... Read More

Check whether a Hashtable contains a specific key or not in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:35:31

162 Views

To check whether a Hashtable contains a specific key or not, 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");     ... Read More

Match the elements of an array in a MySQL query

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:33:22

2K+ Views

Let us first create a table table −mysql> create table DemoTable1523    -> (    -> Id int,    -> Value int    -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1523 values(1, 56); Query OK, 1 row ... Read More

Check the HybridDictionary for a specific key in C#

AmitDiwan

AmitDiwan

Updated on 11-Dec-2019 06:32:29

113 Views

To check the HybridDictionary for a specified key, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       HybridDictionary dict = new HybridDictionary(5);       dict.Add("A", "AB");       dict.Add("B", "BC");       ... Read More

Advertisements