7. C# - Switch Case & LOOPS

 SWITCH:

switch (variable)

{

case (condition): 

    do something

    break;

case (condition):

    do something

    break;

default:

    break;

}


FOR LOOPS (LIKE GOLANG)

for (conditions)

{

do something

}


FOREACH LOOP (LIKE GOLANG, ARRAY LOOP WITH INDEX AND ELEMENT)

foreach (char i in variableArray)

    do something with i


WHILE LOOPS

while (condition)

{

do something


DO WHILE // does the check after doing it atleast once

do {

    do something

} while (condition);



}

Comments

Popular posts from this blog

2. FreeCodeCamp - Dynamic Programming - Learn to Solve Algorithmic Problems & Coding Challenges

20. Data Analytics - Analyze Data to Answer Questions - Week 1

3. Algorithms - Selection Sort