This is your first visit inside The Matrix. Welcome!

The Matrix has you…

This place will take you into the mirage of learning C# programming language, without any previous coding experience being required

Follow the White Rabbit…█

Close
Saturday, January 21, 2017 21:34

Choosing significant variable names

January 21st, 2017

First of all, this is not a mandatory topic. You can name your variables whatever you like. However, you will soon come to understand that choosing significant variable names is a very good programming practice.

If you ask me, the term “generally accepted programming naming convention” is practically a joke.… Read more

Declaration of arrays

January 19th, 2017

When we are dealing with declaration of an array, you should always remember that arrays in C# are fixed length. Their length is set at the time we instantiate them, it determines the total number of elements that they can store, and it cannot be changed/resized anymore.… Read more

Arrays

January 18th, 2017

You’ve made it this far! Well done! Starting with arrays, we can already say we have a very basic knowledge of C# programming. Still a long path ahead of us, but we are no longer n00bs. We now know the fundamental things of (almost) any programming language and we can write basic programs.… Read more

Nested loops

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

Continue operator

January 16th, 2017

In the last article, we spoke about the Break operator being used to immediately stop a loop and continue the execution with the statements that follow after the loop. The Continue operator works somehow in the same way, with the only difference that it will only make the execution skip the current iteration of the loop.… Read more

Break operator

January 16th, 2017

The break operator is used whenever we want to end a loop immediately, even before ending its execution in a natural way. Whenever the Break operator is met, the execution of the loop is immediately stopped and the program continues executing the first instruction that follows after the loop.… Read more

Foreach loop

January 14th, 2017

The Foreach loop is significantly more simpler than the For loop, but it’s also harder for the readers of this blog, since it’s based on concepts we haven’t learned yet. For this reason, i will simply tell you that a Foreach loop was designed to iterate through all elements of an array, list or any other collection of elements that implement iEnumerable interface.… Read more

For loop

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:

for (start_value; end_condition; increment_value)
{
    instructions;
}

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

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

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