AmitDiwan has Published 10744 Articles

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

AmitDiwan

AmitDiwan

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

138 Views

To get the third 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

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

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:25:03

148 Views

To get the sixth 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

Remove all elements from the ArrayList in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:22:05

182 Views

To remove all elements from ArrayList, 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");       list1.Add("D"); ... Read More

Remove all elements from OrderedDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:19:04

117 Views

To remove all elements from OrderedDictionary, 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");       dict.Add("C", "Smart ... Read More

Check if ListDictionary is synchronized in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:16:33

121 Views

To check if ListDictionary is synchronized, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       ListDictionary dict = new ListDictionary();       dict.Add("1", "SUV");       dict.Add("2", "Sedan");       dict.Add("3", "Utility ... Read More

Check if ListDictionary is read-only in C#

AmitDiwan

AmitDiwan

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

143 Views

To check if ListDictionary 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(){       ListDictionary dict1 = new ListDictionary();       dict1.Add("A", "Books");       dict1.Add("B", "Electronics");       dict1.Add("C", "Smart ... Read More

Remove all elements from a SortedList in C#

AmitDiwan

AmitDiwan

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

158 Views

To remove all elements from a SortedList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args){       SortedList sortedList = new SortedList();       sortedList.Add("A", "1");       sortedList.Add("B", "2");       sortedList.Add("C", "3"); ... Read More

Remove all elements from a HashSet in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 07:04:01

219 Views

To remove all elements from a HashSet, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(String[] args){       HashSet set1 = new HashSet();       set1.Add("A");       set1.Add("B");       set1.Add("C");       ... Read More

Get a read-only copy of the OrderedDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 06:59:05

169 Views

To get a read-only copy of the OrderedDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       OrderedDictionary dict1 = new OrderedDictionary();       dict1.Add("A", "Books");       dict1.Add("B", "Electronics");       ... Read More

Check if two Tuple Objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 06:55:15

154 Views

To check if two Tuple objects are equal, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main(String[] args){       var tuple1 = Tuple.Create(150, 400, 500, 700, 100, 1200, 1500);       var tuple2 = Tuple.Create(150, 400, 500, 700, 100, ... Read More

Advertisements