AmitDiwan has Published 10744 Articles

Getting the key at the specified index of a SortedList object in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:18:55

108 Views

To get the key at the specified index of a SortedList object, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list1 = new SortedList();       list1.Add("One", 1);       list1.Add("Two ... Read More

Getting the index of the specified key in a SortedList object in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:13:21

289 Views

To get index of the specified key in a SortedList object, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list = new SortedList();       list.Add("One", "Finance");       list.Add("Two", "Marketing"); ... Read More

Getting index of the specified value in a SortedList object in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:09:37

88 Views

To get index of the specified value in a SortedList object, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list1 = new SortedList();       list1.Add("One", 1);       list1.Add("Two ", ... Read More

Removing the specified key entry from HybridDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:05:42

139 Views

To remove the specified key entry from HybridDcitionary, 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

Remove the first occurrence from the StringCollection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 13:00:00

113 Views

To remove the first occurrence from the StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringCollection stringCol = new StringCollection();       String[] arr = new String[] { "100", "200", "100", "400", "500" ... Read More

Check if the StringCollection is read-only in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:55:55

114 Views

To check if the StringCollection is read-only, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringCollection stringCol = new StringCollection();       String[] arr = new String[] { "100", "200", "300", "400", "500" }; ... Read More

Check if the specified string is in the StringCollection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:52:23

85 Views

To check if the specified string is in the StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringCollection stringCol = new StringCollection();       String[] arr = new String[] { "100", "200", "300", ... Read More

Remove the entry with specified key from ListDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:48:41

101 Views

To remove the entry with specified key from 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

Remove the entry at specified index from OrderedDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:43:34

98 Views

To remove the entry at specified index from OrdererdDictionary, 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

Check if two SortedList objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:39:56

129 Views

To check if two SortedList objects are equal, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list1 = new SortedList();       list1.Add("One", 1);       list1.Add("Two ", 2);     ... Read More

Advertisements