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
338 Views
To add the element to 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"); set1.Add("D"); ... Read More
AmitDiwan
311 Views
To get the fields of the current Type, the code is as follows −Example Live Demousing System; using System.Reflection; public class Demo { public static void Main() { Type type = typeof(System.String); FieldInfo [] fields = type.GetFields(BindingFlags.Static | BindingFlags.NonPublic); Console.WriteLine ("Following ... Read More
AmitDiwan
254 Views
To get the handle for the Type of a specified object, the code is as follows −Example Live Demousing System; public class Demo { public static void Main() { Type type1 = typeof(System.Type); RuntimeTypeHandle typeHandle = Type.GetTypeHandle(type1); Type type = Type.GetTypeFromHandle(typeHandle); ... Read More
AmitDiwan
176 Views
To check whether the Dictionary has the specified key or not, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo { public static void Main() { Dictionary dict = new Dictionary(); dict.Add("One", "John"); ... Read More
AmitDiwan
299 Views
To count, you can use SUM() along with CASE statement for conditions. Let us first create a table −mysql> create table DemoTable1485 -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20), -> StudentSubject varchar(20) -> ); Query OK, 0 rows affected ... Read More
AmitDiwan
245 Views
To indicate whether the specified Unicode character is white space, the code is as follows −Example Live Demousing System; public class Demo { public static void Main() { bool res; char val = ' '; Console.WriteLine("Value = "+val); ... Read More
AmitDiwan
626 Views
Let us first create a table −mysql> create table DemoTable1484 -> ( -> Id int -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1484 values(100); Query OK, 1 row affected (0.25 sec) mysql> insert into ... Read More
AmitDiwan
829 Views
The StringCollection class represents a collection of strings. Following are the properties of the StringCollection class −Sr.noProperty & Description1CountGets the number of key/values pairs contained in the OrderedDictionary collection.2IsReadOnlyGets a value indicating whether the StringCollection is read-only..3IsSynchronizedGets a value indicating whether access to the StringCollection is synchronized (thread safe).4Item[Int32]Gets or ... Read More
AmitDiwan
293 Views
Let us first create a table −mysql> create table DemoTable1483 -> ( -> Salary int -> ); Query OK, 0 rows affected (0.41 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1483 values(100); Query OK, 1 row affected (0.17 sec) mysql> insert into ... Read More
AmitDiwan
464 Views
For this, use \G as in the below syntax −select * from yourTableName\GLet us first create a table −mysql> create table DemoTable1482 -> ( -> Title varchar(255) -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into ... Read More