ForEvolve

A piece of mind...

Boolean algebra laws

A beginner guide to programming with .NET 5 and C#

Boolean algebra laws

This article explores multiple Boolean algebra laws in a programmer-oriented way, leaving the mathematic notation aside. Those laws can be beneficial when working with boolean logic to simplify complex conditions. This article is very light in explanation and exposes the laws using C#. Don’t worry, I’m not recycling myself as a math teacher.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is part of a sub-series, starting with Introduction to Boolean algebra and logical operators. It is not mandatory to read all articles in order, but I strongly recommend it, especially if you are a beginner. If you are already reading the whole series in order, please discard this word of advice.

Continue reading...

Using the switch selection statement to simplify conditional statements blocks

A beginner guide to programming with .NET 5 and C#

Using the switch selection statement to simplify conditional statements blocks

This article explores how to simplify certain complex conditional blocks by introducing the switch statement. The switch keyword is very standard in programming languages. We use it to compare a variable with many values.

Please note that we are not covering switch expressions in this article.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is part of a sub-series, starting with Introduction to Boolean algebra and logical operators. It is not mandatory to read all articles in order, but I strongly recommend it, especially if you are a beginner. If you are already reading the whole series in order, please discard this word of advice.

Continue reading...

Using if-else selection statements to write conditional code blocks

A beginner guide to programming with .NET 5 and C#

Using if-else selection statements to write conditional code blocks

In this article, we are exploring conditional execution flows. What is a code path? What is a conditional? What’s an if statement? These are the subject that we cover here. As part of the beginner journey, we focus on the if-else selection statements LEGO® block, laying down the foundation for more advanced use-cases.

In this article, we are exploring conditional execution flows. What is a code path? How will we do that? These are the subject that we cover here. As part of the beginner journey, we focus on the if-else selection statements LEGO® block, laying down the foundation for more advanced use-cases.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is part of a sub-series, starting with Introduction to Boolean algebra and logical operators. It is not mandatory to read all articles in order, but I strongly recommend it, especially if you are a beginner. If you are already reading the whole series in order, please discard this word of advice.

Continue reading...

Introduction to Boolean algebra and logical operators

A beginner guide to programming with .NET 5 and C#

Introduction to Boolean algebra and logical operators

In this article, I introduce you to Boolean algebra, a branch of algebra that evaluates the value of a condition to true or false. This is a fundamental part of programming that you can’t escape, and you will use this until the end of your programmer career and maybe even beyond that point.

The article is not focusing on mathematical applications and representations but on programming. The objective is to give you the knowledge you need for the next article of the series.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is the first part of a sub-series showcasing the following articles:

Continue reading...

Escaping characters in C# strings

A beginner guide to programming with .NET 5 and C#

Escaping characters in C# strings

In this article, we look at escaping characters in C# strings. But what is escaping, you may wonder? That’s how we write special characters or characters that would otherwise be impossible to include in a string, like ".

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is part of a sub-series, starting with Introduction to string concatenation. It is not mandatory to read all articles in order, but I strongly recommend it, especially if you are a beginner. If you are already reading the whole series in order, please discard this word of advice.

Continue reading...

Introduction to string interpolation

A beginner guide to programming with .NET 5 and C#

Introduction to string interpolation

In this article, we continue to explore string manipulations by focusing on interpolation. Instead of concatenating many pieces together, interpolation allows us to insert special tokens inside a string. A value then replaces those tokens. Interpolation and concatenation play the same role, but often one ends up being more elegant than the other and makes the code easier to maintain.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is part of a sub-series, starting with Introduction to string concatenation. It is not mandatory to read all articles in order, but I strongly recommend it, especially if you are a beginner. If you are already reading the whole series in order, please discard this word of advice.

Continue reading...

Introduction to string concatenation

A beginner guide to programming with .NET 5 and C#

Introduction to string concatenation

In this article, we dig a little more into the string type. We also explore how to concatenate (combine) strings. As a programmer, you will often need to manipulate strings, concatenation and interpolation being two recurring themes. We will cover interpolation in the next installment.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

This article is the first part of a sub-series showcasing the following articles:

Continue reading...

How to read user inputs from a console

A beginner guide to programming with .NET 5 and C#

How to read user inputs from a console

In this article, we explore how to read user inputs from the console. This article is the foundation of more dynamic notions enabling our programs to change based on user interactions and react to them. We also learn how to change the title of the console and how to delete its content.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

Continue reading...

Introduction to C# comments

A beginner guide to programming with .NET 5 and C#

Introduction to C# comments

In this article, we explore how to write comments. Comments are simply human-readable pieces of text that are not compiled nor interpreted. A comment is usually a note that we can leave in the code for the next programmer to get into that code or for us. I left a few comments in preceding installments; did you noticed them?

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

Continue reading...

Introduction to C# constants

A beginner guide to programming with .NET 5 and C#

Introduction to C# constants

In this article, we explore constants. A constant is a special kind of variable. The kind that does not vary; they are immutable.

Immutable means that it cannot change.

This article is part of a learn programming series where you need no prior knowledge of programming. If you want to learn how to program and want to learn it using .NET/C#, this is the right place. I suggest reading the whole series in order, starting with Creating your first .NET/C# program, but that’s not mandatory.

Continue reading...