Hey, I'm Steven a .NET Developer and Freelancer in Zurich, Switzerland. I am a Microsoft MVP. Also, this blog is open source on GitHub.

Older Posts

Preview image blogpost

SOLID Principles in C#

SOLID principles is one of those words/phrases you hear so often about. Also one of those things you most often get asked by your recruiter in a technical assessment.

So let us dissect why Uncle Bob formulated them and how they contribute to "Clean Code".

Read the whole article

Preview image blogpost
  • 6/30/2022
  • 4 minute read

C# vNext - What could come

C# 11 is in front of our doorsteps. A lot of the features are know, so let us have a look at the future. We will discover some features which could be included in C# 12 or later.

Base for this is the csharplang-repository. So let's discover brand new features and how they could help us in our everyday life. We will see things like:

  • Compound assignments in object initializer
  • Discriminated unions
  • semi-auto properties aka field
  • ConfigureAwait(false) on assembly level
  • Exponentiation operator

Read the whole article

Preview image blogpost

Central nuget store for your UNO Platform App

With the newest UNO Platform update to .NET 6 we can leverage some cool things to simplify our dependency management. We combine .NET 6 with the new feature called Directory.Build.props to make that work.

Read the whole article

Preview image blogpost

When does Blazor (not) render?

This blog post whill shed some light on when Blazor renders your content. Of course there are obvious candidates, but there are also some things to be aware about.

Read the whole article

Preview image blogpost

Wrap Event based functions into awaitable Tasks - Meet TaskCompletionSource

You might have code where an object offers you an event to notify you when a specific operation is done. But event's can be tricky to use, especially when you want to have a continuous flow in your application.

That is where TaskCompletionSource comes into play. We can "transform" an event based function into something which is await-able from the outside world via the await keyword.

Read the whole article

Preview image blogpost

goto in action - The exception from the rule

A lot of developers will say never use goto. This keyword is bad as it promotes spaghetti code. But as so often in live the exception confirms the rules. Let's see where goto can increase the readability and maintainability.

Read the whole article

Preview image blogpost

What is the difference between C#, .NET, IL and JIT?

When you get started or even if you have quite some knowledge it can be confusing to juggle with those terms. So what is the difference between C# and .NET? And what does it have to do with IL and JIT?

Read the whole article

Preview image blogpost

Delegate, Action, Func, Lambda expression - What the heck!?

C# offers a lot of utility especially around the delegate topic. So let's see what exactly a delegate is and how the distinct types like delegate, Action, Func, Predicate, anonymous function, lambda expressions and MulticastDelegate behave. A lot to digest and discover so let's go.

Read the whole article

Preview image blogpost

The garbage collector in .NET - Part 2: Compacting

I already made a post about how the Garbage Collector works in .NET and also introduced the topic of Generation slightly. This article will look a bit more in detail into why we have those mechanisms in the first place, including the Large Object Heap.

Read the whole article

Preview image blogpost

ObjectPool - Rent and return some instances

Just imagine a car pool: There is a dealer which bought the car and lent's it to you. After a while you will return this car where you got it from. Much like that works an ObjectPool in C#. You can rent an expensive object from the pool and when you are done with it, you just return it. Sounds beautiful, doesn't it?

Let's explore the advantages and disadvantages of a ObjectPools and how they work.

Read the whole article

An error has occurred. This application may no longer respond until reloaded. Reload x