In a previous post in which we discussed about the Null Object Pattern, we discussed of a hackish approach to make sure that the default properties cannot be changed. Please note that the code snippets from this post have been run in LinqPad so they can be used as is, to run them in Visual … Continue reading The C# 9 init-only setters
Snippets
Creating zips server side per request
Hello and welcome 😀, Today's post will focus on a situation I encountered recently, and that is How to create a zip archive on demand to be served via an API endpoint. In a following post, we will see how to receive a file from an AJAX call since there's some trickery involved there as … Continue reading Creating zips server side per request
Compression and decompression snippets
Hello and Welcome 🙂 Today I want to look at a few extension methods to help with compressing either string or just byte arrays (which could be files, images, objects, basically, everything can be represented as a byte array). The backstory The need for this came when I was participating in a hackathon (in which … Continue reading Compression and decompression snippets