
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
Chandu yadav has Published 1091 Articles

Chandu yadav
1K+ Views
Create a method to get the nth value with recursion.public int displayFibonacci(int n)Call the method −displayFibonacci(val)On calling, the displayFibonacci() meyhod gets called and calculate the nth value using recursion.public int displayFibonacci(int n) { if (n == 0) { return 0; } if (n == ... Read More

Chandu yadav
3K+ Views
Declare and initialize a list.var products = new List (); products.Add("Accessories"); products.Add("Clothing"); products.Add("Footwear");To get the size, use the Capacity property.products.CapacityNow let us see the complete code to find the size of a list.Example Live Demousing System; using System.Collections.Generic; public class Demo { public static void Main(string[] args) { ... Read More

Chandu yadav
595 Views
To get the sum of digits using recursion, set a method in C# that calculates the sum.static int sum(int n) { if (n != 0) { return (n % 10 + sum(n / 10)); } else { return 0; }The above ... Read More

Chandu yadav
265 Views
Firstly, declare a HashSet and add elements −var names = new HashSet(); names.Add("Tim"); names.Add("John"); names.Add("Tom"); names.Add("Kevin");To remove an element, use RemoveWhere.names.RemoveWhere(x => x == "John");Let us see the complete example −Exampleusing System; using System.Collections.Generic; public class Program { public static void Main() { var names = ... Read More

Chandu yadav
14K+ Views
All these keywords are part of the main method of any C# program.The Main method, which is the entry point for all C# programs states that what a class does when it executed.using System; class Demo { static void Main(string[] args) { Console.WriteLine("My first program in C#!"); } ... Read More

Chandu yadav
1K+ Views
The best IDE for C# on Windows is Microsoft Visual Studio. It is an IDE to develop websites, web apps, mobile apps, etc.The following are the features of Visual Studio IDE −Code Editor − Visual Studio has a code editor supporting syntax highlighting and code completion using IntelliSense.Breakpoints − Set ... Read More

Chandu yadav
523 Views
Set three arraysint[] arr1 = { 99, 57, 63, 98 }; int[] arr2 = { 43, 99, 33, 57 }; int[] arr3 = { 99, 57, 42 };Now set the above elements using HashSet.// HashSet One var ... Read More

Chandu yadav
2K+ Views
To make code reusable in C#, use Interfaces. Interfaces define properties, methods, and events, which are the members of the interface. Interfaces contain only the declaration of the members. It is the responsibility of the deriving class to define the members. It often helps in providing a standard structure that ... Read More

Chandu yadav
4K+ Views
Let’s say you need to get the value of 10 dollars in INR.Firstly, set the variables: double usd, inr, val;Now set the dollars and convert it to INR.// how many dpllars usd = 10; // current value of US$ val = 69; inr = usd * val;Let us see the ... Read More

Chandu yadav
717 Views
To display a line, Console.Write() is used in C#.Console displays the result on the console. I have first set a string.string str = "Tom Hanks is an actor";Now displaying the above line.Console.WriteLine(str);The following is the complete code −Example Live Demousing System; namespace Program { public class Demo { ... Read More