Tuesday, October 20, 2020 16:41

Posts Tagged ‘loops’

IEnumerator and IEnumerable

Friday, May 8th, 2020

Before we can start delving into LINQ, we need to first understand the underlying principles upon which it is built. LINQ is all about operations over collections, so, you’ve guessed it: we will be dealing with collections.

You already learned that of all data structures, arrays are the fastest, because they are unsorted non-generic data structures.… Read more

Iteration through the elements of an array

Wednesday, April 5th, 2017

Iteration through the elements of an array is basically the way we access all the elements of an array, in an automated way. The first type of loop we will exemplify is the For loop.

It is always a good practice to use a for loop whenever you deal with an array or any other structure with indices.… Read more

Nested loops

Tuesday, January 17th, 2017

Nested loops are programming concepts consisting of two or more loops placed one into the other. The innermost loop is executed the most times, while the outermost, the least times. This is because the inner loops have to perform all of their cycling for every cycle of their next outer loop.… Read more

For loop

Saturday, January 14th, 2017

For loop is a kind of repeating code construct which is a bit more complex than the previous types of loops we learned so far. On the other hand, they can solve more complicated tasks, with less code involved.

The syntax of the For instruction is the following:

When the program repeats (cycles) the instructions for a certain number of times, you will usually use a variable called control variable, which indicates how many times you executed the instructions.… Read more

Do While loop

Friday, January 13th, 2017

The Do While loop is used any time we want to make sure that the instructions will be executed at least once, even if the condition of the loop evaluates as False. As we learned in the previous lesson, a loop is a construct that lets us run one or more instructions repeatedly, until a condition is evaluated as False.… Read more

While loop

Friday, January 13th, 2017

Loops are a special kind of instructions that repeat a piece of code a specific number of times or until a special condition becomes True. There are also loops that never end, called infinite loops, and they are rather errors than useful code.… Read more


Do NOT follow this link or you will be banned from the site!