Does readonly make your code faster?
In this blog post we will discover whether or not the readonly
modifier can make your code faster. So without further ado let's get started.
Hey, I'm Steven a .NET Developer in Switzerland. I am a Microsoft MVP. Also, this blog is open source on GitHub.
In this blog post we will discover whether or not the readonly
modifier can make your code faster. So without further ado let's get started.
AI is a hot topic - one would say hype topic, and there are bold claims like this:
There Will Be No (Human) Programmers in Five Years
Source: https://decrypt.co/147191/no-human-programmers-five-years-ai-stability-ceo
Now how far is this from reality? Let's take a look at the current state of AI in the context of programming.
Sometimes, you have multiple async calls to make, and you want to do that asynchronously and get the results afterward. Let's build a fluent API to do that.
Deconstructor are a C# language feature that allows you to define a method that will be called when an object is being split up into its components. While this is straightforward to implement for your own types, it is not possible to add a deconstructor to a 3rd party type - or is it?
Pattern matching is a powerful feature in C#. It allows you to match a value against a pattern and extract information from the value. The compiler does the magic for you - and sometimes it struckles with that.
C# 13 might get a new feature soon that allows ref
and unsafe
in iterators and async methods.
Hangfire/Quartz or BackgroundService? Why not something in the middle? Did you ask yourself this question from time to time? Do you want to have a full-blown job scheduler with lots of setups, but more than BackgroundService is needed?
Meet: NCronJob!
Next to the big release of .NET 8, we also released the first preview bUnit v2. This release is a major release, with a lot of new features and improvements. In this post, I will highlight some of the most important changes. This includes new features but also some breaking changes.
I recently discovered this small but very useful utility in xUnit: TheoryData<T>
.
A few weeks back, I wrote an article "A new lock type in .NET 9" where I showcased the new Lock
type. Nothing fancy - well, at least it was more expressive. But now the dotnet team went a step further with this!