AmitDiwan has Published 10740 Articles

Getting the Values in a SortedList object in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 11:59:40

140 Views

To get the values in a SortedList object, the code is as follows −Exampleusing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list = new SortedList();       list.Add(1, "One");       list.Add(2, "Two");       list.Add(3, ... Read More

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

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 11:55:44

134 Views

To get the value 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 list = new SortedList();       list.Add("A", "Jacob");       list.Add("B", ... Read More

Check if the ArrayList is read-only in C#

AmitDiwan

AmitDiwan

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

181 Views

To check if the ArrayList is read-only, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       ArrayList list1 = new ArrayList();       list1.Add("ABC");       list1.Add("BCD");       list1.Add("CDE");     ... Read More

Creating an empty HybridDictionary with specified case sensitivity in C#

AmitDiwan

AmitDiwan

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

151 Views

To create an empty HybridDictionary with specified case sensitivity, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main() {       HybridDictionary myDict = new HybridDictionary();       myDict.Add("A", "AB");       myDict.Add("B", "BC");   ... Read More

Creating an empty case-sensitive HybridDictionary Class in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 11:42:51

129 Views

To create an empty case-sensitive 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 dict = new HybridDictionary(false);       dict.Add("A", "AB");       dict.Add("B", "BC");       dict.Add("C", ... Read More

Creating an ArrayList having specified initial capacity in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 11:37:24

179 Views

To create an ArrayList having specified initial capacity, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       ArrayList list1 = new ArrayList(5);       list1.Add("A");       list1.Add("B");       list1.Add("C");   ... Read More

Creating a synchronized wrapper for the Hashtable in C#

AmitDiwan

AmitDiwan

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

155 Views

To create a synchronized wrapper for the Hashtable, 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("1", "AB");       hash.Add("2", "CD");       hash.Add("3", ... Read More

Creating a synchronized wrapper for the ArrayList in C#

AmitDiwan

AmitDiwan

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

155 Views

To create a synchronized wrapper for the ArrayList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main() {       ArrayList arrList = new ArrayList();       arrList.Add("AB");       arrList.Add("CD");       arrList.Add("EF");     ... Read More

Check if the ArrayList has a fixed size in C#

AmitDiwan

AmitDiwan

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

212 Views

To check if the ArrayList has a fixed size, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       ArrayList list1 = new ArrayList();       list1.Add("One");       list1.Add("Two");       list1.Add("Three"); ... Read More

Check if ArrayList is Synchronized (thread safe) in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 11:24:52

334 Views

To check if ArrayList is synchronized, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       ArrayList list1 = new ArrayList();       list1.Add("A");       list1.Add("B");       list1.Add("C");       ... Read More

Advertisements