Typesafety in xUnit with TheoryData<T>
I recently discovered this small but very useful utility in xUnit: TheoryData<T>
.
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.
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!
Boolean parameters are nice, but it's hard to keep track of what each one does when you have multiple of them. In this blog post, we will see why it's better to avoid multiple boolean parameters and how to refactor them.
After my first LINQ MindMap: Here is an updated version that includes everything up until .NET 9.
In this blog post, a small and (over)simplified infographic on how the Garbage Collector works.
SearchValues,
which were introduced with .NET 8 will become an upgrade and becomes more usable! Let's see how.
Even though we are in the alpha of .NET 9 and .NET 8 was released not more than two months ago, the dotnet team does not sleep and pushes new changes! In this blog post, we are checking what new methods were added to everyones favorite: LINQ.
In the old .NET Framework days, you could use the BinaryFormatter
class to serialize and deserialize objects. This can be convenient for cloning or storing some session states. As the BinaryFormatter
has some serious security concerns, the .NET team marked it as obsolete (as error) in .NET 7 and onwards.
I am not the biggest fan of AutoMapper. It starts with good intentions but often ends up being a big mess. I have seen it used in many projects, and the configuration of the mappings is often scattered all over the place, and or they are huge!
We know the const
keyword with strings - but are they really constant after all? Or can we use some tricks to modify them? Let's see.