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
300 Views
To check the current state of a thread, the code is as follows −Example Live Demousing System; using System.Threading; public class Demo { public static void Main(){ Thread thread = new Thread(new ThreadStart(demo1)); ThreadPool.QueueUserWorkItem(new WaitCallback(demo2)); Console.WriteLine("Current state of Thread = "+thread.ThreadState); ... Read More
AmitDiwan
302 Views
To add key/value pairs in SortedList, 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", "Sam"); list.Add("C", "Tom"); ... Read More
AmitDiwan
226 Views
To get the unique identifier for the currently managed thread, the code is as follows −Example Live Demousing System; using System.Threading; public class Demo { public static void Main(){ Thread thread = new Thread(new ThreadStart(demo1)); ThreadPool.QueueUserWorkItem(new WaitCallback(demo2)); Console.WriteLine("ManagedThreadId = "+thread.ManagedThreadId); ... Read More
AmitDiwan
109 Views
To get the type of the Tuple’s element, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(String[] args){ var tuple1 = Tuple.Create(150, 1500, Tuple.Create(50, 100)); var tuple2 = Tuple.Create(150, 1500, Tuple.Create(100, 200)); Console.WriteLine("Is ... Read More
AmitDiwan
248 Views
To get the type of the current instance, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(){ string s = "Demo"; Console.WriteLine("String = " +s); Console.WriteLine("String Type = " +s.GetType()); } }OutputThis ... Read More
AmitDiwan
168 Views
To get an enumerator for a range of elements in 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(100); arrList.Add(200); ... Read More
AmitDiwan
153 Views
To get or set the value of the bit at a specific position in 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(2); BitArray arr2 = new ... Read More
AmitDiwan
913 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
AmitDiwan
179 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
AmitDiwan
431 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