Understanding IOptions, IOptionsMonitor, and IOptionsSnapshot in .NET 7
There are several ways to handle configurations in a .NET Application. In this article, we’re going to learn how to useIOptions<T>
, IOptionsSnapshot<T>
, and IOptionsMonitor<T>
Continue reading
C# Tip: Advanced Switch Expressions and Switch Statements using filters
We all useswitch
statements in our code. Do you use them at their full potential?
Continue reading
How to download an online file and store it on file system with C#
Downloading a file from a remote resource seems an easy task: download the byte stream and copy it to a local file. Beware of edge cases! Continue readingC# Tip: Format Interpolated Strings
Interpolated strings are those built with the$
symbol, that you can use to create strings using existing variables or properties. Did you know that you can apply custom formattings to such values?
Continue reading
Davide's Code and Architecture Notes - Postel's law for API Robustness
A system should be robust: it should be able to resist change and, well, not generate regressions. Postel’s law helps define a mindset to create robust APIs. Continue readingC# Tip: Access items from the end of the array using the ^ operator
Shorter code is often easier to read. Not always, but often. And the^
operator can make your code easier to read and less error-prone
Continue reading