AmitDiwan has Published 10744 Articles

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

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:22:50

878 Views

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

Check if two ListDictionary objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:15:24

147 Views

To check if two ListDictionary objects are equal, 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

Check if two List objects are equal in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:09:29

395 Views

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

Remove the element with the specified key from the Hashtable in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:06:52

142 Views

To remove the element with the specified key from 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(10);       hash.Add("1", "A");       hash.Add("2", "B");     ... Read More

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

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:03:47

105 Views

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

Getting an enumerator that iterates through LinkedList in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 07:01:06

903 Views

To get an enumerator that iterates through LinkedList, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       LinkedList list = new LinkedList();       list.AddLast("A");       list.AddLast("B");       list.AddLast("C");       ... Read More

Get the number of elements in the SortedSet in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:56:50

129 Views

To get the number of elements in the SortedSet, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       SortedSet set1 = new SortedSet();       set1.Add("AB");       set1.Add("BC");       set1.Add("CD");     ... Read More

Get the number of elements contained in the Stack in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:52:50

223 Views

To get the number of elements contained in the Stack, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Stack stack = new Stack();       stack.Push("A");       stack.Push("B");       stack.Push("C");   ... Read More

Add an object to the end of the Queue - Enqueue Operation in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:50:07

210 Views

To add an object to the end of the Queue, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Queue queue = new Queue();       queue.Enqueue("Electronics");       queue.Enqueue("Accessories");       queue.Enqueue("Toys");   ... Read More

Convert Stack to array in C#

AmitDiwan

AmitDiwan

Updated on 06-Dec-2019 06:46:53

418 Views

To convert stack to the array, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Stack stack = new Stack();       stack.Push("AB");       stack.Push("CD");       stack.Push("FG");       stack.Push("KL");   ... Read More

Advertisements