Categories
Code Conceptual

You Are Not Your Code

It’s not personal.

Your code reflects neither your beliefs, nor your upbringing, nor your character.

Your thoughts and your opinions evolve, new ideas form, and you change. 

The you of today will be different from the you of tomorrow.

Embrace the difference, you and your code are better because it.

Categories
Code

The 5 Different Meanings of the Question Mark in C#

In C# the question mark has 5 meanings as of C# 8.

  1. Ternary operators
(true ? "true": "false")

2. Null conditional operator

items?.Count()

3. Nullable types (this should be rebranded as nullable value types)

int?

4. Null-coalescing operator

isnull ?? string.Empty

5. Nullable reference types

string?