Switch Case in C#

Learn switch case in C# language with simple explanation, doubts and code example. Switch case statement in C# is also conditional statement. In switch condition e.g. switch(value), the value of variable is matched to case written in it body. Whatever case matches the value of variable, that block get executed and exit from the switch…

Read the full article

If Else in C# – Includes If-Else Ladder

Learn if else in C# including if else ladder and nested if else conditional statements with simple explanation and program example. If else in C# programming is a decision-making statement / condition followed by a code block that is used in the program. Depending on evaluation of Boolean expression or conditions to true or false,…

Read the full article

Arithmetic operators in C#

Learn about arithmetic operators in C# programming i.e. + plus, – minus, * multiplication, /division and % modulo operators with simple example and explanation. Below are the arithmetic operators in C# language that are used to perform arithmetic operations on primitive data types i.e. int, float and double etc in C#. + Plus – Minus/Subtraction…

Read the full article

Assignment operators in C#

Assignment operators in C#- Learn about assignment operator in C# with example and easy explanation. Also, learn assignment operator combined with arithmetic operators in C# like +=, *= etc. with example. = Assignment operator in C# Assignment operator in C# program is used to assign a value to a variable. For example, int a =…

Read the full article

Operators in C#

Learn about operators in C# with examples and simple explanations with code. What is operators in C#? Operators are special symbols that are used to perform operations on one or more operands in C# programming. Generally, these operators are applied on primitive data types in C# e.g. int, float and double etc. Operands example –…

Read the full article

Getting Input from User / Keyboard in C#

Getting Input from User / Keyboard in C# – Learn how to get input from user / keyboard like int, string and double data types etc in C# program. Example of taking integer / string input using Console.ReadLine method in C#. To get the input from user, we use predefined Console.ReadLine method. Console.ReadLine-Read complete string…

Read the full article