Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10740 Articles
AmitDiwan
249 Views
To copy the Hashtable elements to an Array Instance, 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", "EF"); ... Read More
AmitDiwan
181 Views
To get a subset in a 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"); set1.Add("EF"); ... Read More
AmitDiwan
149 Views
To create a 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(100); stack.Push(150); stack.Push(175); stack.Push(200); ... Read More
AmitDiwan
110 Views
To copy the entire ArrayList to a 1-D array starting at the specified index, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(){ ArrayList list = new ArrayList(); list.Add("PQ"); list.Add("RS"); ... Read More
AmitDiwan
176 Views
To copy the elements of ArrayList to a new array, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(){ ArrayList list = new ArrayList(10); list.Add("A"); list.Add("B"); list.Add("C"); ... Read More
AmitDiwan
151 Views
To create 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
AmitDiwan
169 Views
To create a shallow copy of the BitArray, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(){ BitArray arr1 = new BitArray(5); arr1[0] = false; arr1[1] = true; ... Read More
AmitDiwan
236 Views
To copy the entire ArrayList to a one-dimensional array, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(){ ArrayList list = new ArrayList(); list.Add("AB"); list.Add("BC"); list.Add("CD"); ... Read More
AmitDiwan
516 Views
To copy a String into another String, the code is as follows −Example Live Demousing System; public class Demo { static public void Main(){ string str1 = "Kevin"; string str2 = String.Copy(str1); Console.WriteLine("String1 = "+str1); Console.WriteLine("String2 = "+str2); ... Read More
AmitDiwan
644 Views
To check whether a List contains a specified element, 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