
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
Arjun Thakur has Published 1025 Articles

Arjun Thakur
868 Views
Use the Sort method to sort the KeyValuePairs collection.Firstly, set the collection −var myList = new List(); // adding elements myList.Add(new KeyValuePair(1, 20)); myList.Add(new KeyValuePair(2, 15)); myList.Add(new KeyValuePair(3, 35)); myList.Add(new KeyValuePair(4, 50)); myList.Add(new KeyValuePair(5, 25));To sort, use the Sort() method. With that, we have used the CompareTo() method to ... Read More

Arjun Thakur
178 Views
MySQL LIKE operator is used to select data based on pattern matching. Similarly, we can use LIKE operator with views to select particular data based on pattern matching from the base table. To understand this concept we are using the base table ‘student_info’ having the following data −mysql> Select * from Student_info; ... Read More

Arjun Thakur
3K+ Views
Use DateTime.Subtract to get the difference between two dates in C#.Firstly, set two dates −DateTime date1 = new DateTime(2018, 8, 27); DateTime date2 = new DateTime(2018, 8, 28);Use the Subtract method to get the difference −TimeSpan t = date2.Subtract(date1);The following is the complete code −Example Live Demousing System; using System.Threading; using ... Read More

Arjun Thakur
2K+ Views
To convert a string to a bool, use the Bool.parse method in C# −Firstly, set a string −string str = "false";Now, convert it to bool −bool.Parse(str);Here is the complete code −Example Live Demousing System; using System.Linq; class Demo { static void Main() { string str = "false"; ... Read More

Arjun Thakur
728 Views
Use the DaysInMonth to display the number of days in a month.Add the year and month as a parameter for the DaysInMonth() method −DateTime.DaysInMonth(2018, 8);The following is an example −Example Live Demousing System; using System.Collections.Generic; using System.Linq; public class Demo { public static void Main() { Console.WriteLine("Today ... Read More

Arjun Thakur
99 Views
Use the TimeSpan.Zero to represent the exact representation of no time i.e −00:00:00Set an object for TimeSpan −TimeSpan ts;Now, the TimeSpan.Zero is used to display no time −TimeSpan ts = TimeSpan.Zero;Example Live Demousing System; using System.Linq; public class Demo { public static void Main() { TimeSpan ts ... Read More

Arjun Thakur
52 Views
It gets an array of the names of constants in an enumeration. The following is the syntax −Enum.GetNames(Type)Here, Type is an enumeration type.The following is an example −Example Live Demousing System; class Demo { enum Vehicle { Car, Motorbike, Truck, ... Read More

Arjun Thakur
697 Views
To handle range of bytes, use Buffer Type in C#. Its method Buffer.BlockCopy copies the bytes from one byte array to another byte array.Example Live Demousing System; class Demo { static void Main() { // byte arrays byte[] b1 = new byte[] {39, 45, ... Read More

Arjun Thakur
234 Views
Read individual bytes using GetByte() method in C# −Set an array −int[] arr = { 3, 4, 12 };Now, use Buffer.GetByte() to display the array elements and to read individual bytes −for (int i = 0; i < Buffer.ByteLength(arr); i++) { Console.WriteLine(Buffer.GetByte(arr, i)); }The following is the code −Example Live ... Read More

Arjun Thakur
259 Views
Declare a string and add elements −string[] str = { "One", "Two", "Three", "Four", "Five" };Use the Join() method to join the words−string res = string.Join(" ", str);Let us see the complete code −Example Live Demousing System; public class Demo { public static void Main() { ... Read More