
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 10744 Articles

AmitDiwan
441 Views
To get a specific field of the current type in C#, the code is as follows −Example Live Demousing System; using System.Reflection; public class Demo { public static void Main() { Type type = typeof(Subject); try { FieldInfo fieldInfo = type.GetField("SubName"); ... Read More

AmitDiwan
149 Views
To add the specified key and value into the ListDictionary, 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", "One"); dict.Add("2", "Two"); ... Read More

AmitDiwan
125 Views
To get the array of the values of the constants in the current enumeration type, the code is as follows −Example Live Demousing System; public class Demo { enum Vehicle {Car, Bus, Bike, Airplane} public static void Main() { try { Type ... Read More

AmitDiwan
321 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
281 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
228 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
154 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
275 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
221 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
599 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