Iqra Technology

C# Break & Continue

❮ Previous Next ❯ Break, Continue and goto Break In C#, the break statement is used to exit or “break” out of a loop or a switch statement. It’s commonly used when a certain condition is met, and you want to immediately exit the loop or switch statement, regardless of whether the loop’s condition is […]

C# Break & Continue Read More »

C# Do-While Loop

❮ Previous Next ❯ while and do-while Loops in C#: while Loop: In C#, a while loop is a control flow statement that repeatedly executes a block of code as long as a specified condition is true. It’s often used when you don’t know in advance how many times you need to execute the loop,

C# Do-While Loop Read More »

C# For Loop

❮ Previous Next ❯ For and Foreach Loop in C# For Loop In C#, a for loop is a control flow statement that allows you to execute a block of code repeatedly based on a specified condition. It’s typically used when you know how many times you want to repeat a block of code. Basic

C# For Loop Read More »

C# switch

❮ Previous Next ❯ Switch Case in C# In C#, the switch is a control statement that allows you to select one of many code blocks to be executed. It’s often used when you have a single expression (variable or value) that you want to compare against multiple possible values and execute different blocks of

C# switch Read More »

C# if-else

❮ Previous Next ❯ If Else Statement in C# In C# programming, the if statement is used to test the condition. There are various types of if statements in C#. For Example: if statement if-else statement if-else-if ladder statement If Statement Basic Structure if (condition){     //code for execution} Scenario 1: Write a C# program that

C# if-else Read More »