c#

C# program to find a value in an array

C# program to find a value in an array. This post will show how to use different find methods defined in C# array with example.

Read

C# program to find the sum of all digits of a number

C# program to find the sum of all digits of a number. This program will take the number as input from the user and print the sum of all digits.

Read

C# program to check if a number is prime or not

C# program to check if a user input number is a prime number or not. It will use a function to check if a given number is prime or not prime.

Read

Ternary operators in C#

Ternary operator is used as a decision making operator in C#. It is similar to if-else condition. In this post, we will learn how to use ternary operator in C# with example.

Read

C# program to reverse a number

C# program to reverse a number. It will take one number as input from the user, reverse it and then print out the reversed number.

Read

C# program to swap two numbers using XOR

XOR can be used to swap two numbers. In this post, we will learn how to use XOR to swap two numbers in C# with an example.

Read

2 ways to compare two characters in C#

Learn how we can compare two characters in C#. The program will take two characters as inputs from the user, compare them and print one message if both are equal or not.

Read

3 different ways in C# to print a new line

We can print a new line in different ways in c#. This post shows three different ways to print a new line with example.

Read

C# program to print the weekday using switch case

C# program to print the weekday using switch case. This program will take one number as the input from the user and it will print the day name using switch case.

Read

C# program to find the largest of two numbers

C# program to find the largest of two numbers. The C# program will take two numbers as inputs from the user and print out a message.

Read