
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
Samual Sam has Published 2310 Articles

Samual Sam
923 Views
To print duplicates from a list of integers, use the ContainsKey.Below, we have first set the integers.int[] arr = { 3, 6, 3, 8, 9, 2, 2 };Then Dictionary collection is used to get the count of duplicate integers.Let us see the code ... Read More

Samual Sam
113 Views
To find the difference between two dates in C#, you need to first set two dates to be compared using the DateTime object. We will use the DateTime class in C#.Date 1DateTime date1 = new DateTime(2018, 09, 15); Console.WriteLine("Date 1 : {0}", date1);Date 2DateTime date2 = new DateTime(2018, 09, 28); ... Read More

Samual Sam
374 Views
With C#, you can easily display the following diamond shape.$ $$$ $$$$$ $$$$$$$ $$$$$$$$$ $$$$$$$ $$$$$ $$$ $To display a diamond shape, you need to focus on the following points −Number of rows Dollar sign to be displayed Empty spacesConsidering the above you can easily create the diamond shape as ... Read More

Samual Sam
17K+ Views
Use the Contains() method to check if a string contains a word or not.Set the string −string s = "Together we can do so much!";Now let’s say you need to find the word “much”if (s.Contains("much") == true) { Console.WriteLine("Word found!"); }Let us see the complete code −Example Live Demousing System; ... Read More

Samual Sam
2K+ Views
Declare a new ArrayList and add elements to it.ArrayList arr = new ArrayList(); arr.Add( "One" ); arr.Add( "Two" ); arr.Add( "Three" ); arr.Add( "Four" );Now let’s say you need to remove the element “Three”. For that, use the Remove() method.arr.Remove("Three");The following is the complete example to remove an element from ... Read More

Samual Sam
543 Views
Firstly, set the first two numbers −double val1, val2; val1 = 10; val2 = 5;Now use the Math.Sqrt function to use Pythagoras Theorem.res = Math.Sqrt(val1 * val1 + val2 * val2);Example Live Demousing System; public class Program { public static void Main(string[] args) { double val1, val2, ... Read More

Samual Sam
2K+ Views
The ReadLine() method is used to read a line from the console in C#.str = Console.ReadLine();The above will set the line in the variable str.Example Live Demousing System; using System.Collections.Generic; class Demo { static void Main() { string str; // use ReadLine() ... Read More

Samual Sam
13K+ Views
To remove an item from a list in C# using index, use the RemoveAt() method.Firstly, set the list −List list1 = new List() { "Hanks", "Lawrence", "Beckham", "Cooper", };Now remove the element at 2nd position i.e. index 1list1.RemoveAt(1);Let us see the complete example −Example Live Demousing System; ... Read More

Samual Sam
453 Views
Queue represents a first-in, first out collection of object. It is used when you need a first-in, first-out access to items. When you add an item to the list, it is called enqueue, and when you remove an item, it is called deque.Let us see an example of the Queue ... Read More

Samual Sam
683 Views
Chained Exceptions are a chain of try-catch statements that handle exceptions. To create a chain of exceptions i.e. chained exceptions −Set the first try-catch −Examplestatic void Main(string[] args) { try { One(); } catch (Exception e) { Console.WriteLine(e); } }Now try-catch ... Read More