Check if HybridDictionary has fixed size in C#

AmitDiwan
Published on 06-Dec-2019 10:20:34
To check if HybridDictionary has fixed size, 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

Adding new node or value at the end of LinkedList in C#

AmitDiwan
Published on 06-Dec-2019 10:17:22
To add new node or value at the end of LinkedList, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {       LinkedList<String> list = new LinkedList<String>();       list.AddLast("A");       list.AddLast("B");       ... Read More

Adding elements to the end of the ArrayList in C#

AmitDiwan
Published on 06-Dec-2019 10:13:53
To add elements to the end of the ArrayList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       ArrayList list = new ArrayList();       list.Add("Andy");       list.Add("Gary");       list.Add("Katie"); ... Read More

Adding an element to the List in C#

AmitDiwan
Published on 06-Dec-2019 10:09:57
To add an element to 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<String> list = new List<String>();       list.Add("One");       list.Add("Two");       list.Add("Three");     ... Read More

Check if SortedDictionary contains the specified key or not in C#

AmitDiwan
Published on 06-Dec-2019 10:06:36
To check if SortedDictionary contains the specified key or not, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Generic; public class Demo {    public static void Main() {       SortedDictionary<int, string> sortedDict = new SortedDictionary<int, string>();       sortedDict.Add(100, "Mobile");       ... Read More

Check if Hashtable is synchronized C#

AmitDiwan
Published on 06-Dec-2019 10:02:38
To check if Hashtable is synchronized, 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");       hash.Add("Three", "Barry");   ... Read More

Removing the specified element from the List in C#

AmitDiwan
Published on 06-Dec-2019 09:58:34
To remove the specified element 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<String> list1 = new List<String>();       list1.Add("One");       list1.Add("Two");       list1.Add("Three");   ... Read More

Remove the first occurrence of a specific object from the ArrayList in C#

AmitDiwan
Published on 06-Dec-2019 09:52:39
To remove the first occurrence of a specific object from the ArrayList, the code is as follows −Exampleusing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       ArrayList list1 = new ArrayList();       list1.Add("A");       list1.Add("B");     ... Read More

Check if a SortedList is read-only in C#

AmitDiwan
Published on 06-Dec-2019 09:46:34
To check if a SortedList is read-only, 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", "IT");       list.Add("Two ", "Operations");       ... Read More

Getting the keys in a SortedList object C#

AmitDiwan
Published on 06-Dec-2019 09:41:16
To get the keys 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
Advertisements