Blog Posts

How to process ZIP Files from a Stream in .NET

How to process ZIP Files from a Stream in .NET

When working with ZIP files in .NET, there may be cases where the file is not stored on disk but comes directly as a Stream. This could happen if you

Decompress a ZIP archive with .NET

Decompress a ZIP archive with .NET

Working with compressed files is common in many applications, whether you're extracting data from an archive, installing software packages, or retrie

Compress a folder of files to a ZIP archive with .NET

Compress a folder of files to a ZIP archive with .NET

When working with .NET apps you may sometimes need to bundle multiple files into a single compressed archive for easier storage, transfer, or process

Read cpu load on Windows with .NET

Read cpu load on Windows with .NET

In C# (.NET 6 and above), there is now a very simple way to read out the CPU load with minimal overhead - i.e. without threads. The PerformanceCounte

.NET: the cost of returning an empty collection

.NET: the cost of returning an empty collection

Dealing with empty lists is an everyday situation in .NET. An empty list is often preferred to a null in order to control the logic. But how expensiv

.NET: use a preview version in your global.json

.NET: use a preview version in your global.json

We are currently in the preview phase of .NET 9, which releases in Nov 2024 - and if you want to test it extensively like I do, store the preview ver

Efficiently clean a string with .NET

Efficiently clean a string with .NET

Strings are one of the most commonly used types in .NET applications - and very often the source of inefficient code. For example, cleaning up a stri

Refit .NET - my personal caller best practise

Refit .NET - my personal caller best practise

Refit is an open-source library for .NET developers that simplifies the process of making HTTP API calls. It allows developers to define a set of int

Strong Name Sign .NET Assemblies via SNK

Strong Name Sign .NET Assemblies via SNK

Strong Name Signing is a mechanism in .NET development that ensures the integrity and authenticity of assemblies. It is based on a public-private key

Handle Yaml Files with .NET

Handle Yaml Files with .NET

YAML files are unfortunately part of everyday life for all developers these days; and although they are very error-prone and almost impossible to edi