Josef Ottosson

Freelancing Developer ยท Microsoft MVP

Subscribe via RSS
© Josef Ottosson 2026

dotnet

A collection of 48 posts

dotnet

UnsafeAccessor is my new best friend

How can you access a private field using both Reflection and the new UnsafeAccessor approach introduced in .NET 8, and what are the benefits in terms of performance and code reduction?

2 years ago July 11th, 2024 2 min read
dotnet

Act on a Task as soon as it's completed with Task.WhenEach

Task.WhenEach allows us to act on a collection of tasks as they finish.

2 years ago June 17th, 2024 1 min read
dotnet

C# - Tips and Tricks 03 - Use static initialization

Static initialization can help make your code a bit more readable and at the same time give you a performance boost, a win-win.

2 years ago March 25th, 2024 2 min read
postgres

Streaming files to Postgres - dotnet core

Storing files in a database without allocating like crazy? Let's see how we can stream files to Postgres with dotnet core and npgsql.

2 years ago January 22nd, 2024 4 min read
httpclient

Customize the HttpClient logging - dotnet core

How to customize the HttpClient logging

2 years ago December 15th, 2023 2 min read
Subscribe via RSS
© Josef Ottosson 2026