notes from a passionate developer




This is a personal blog. The opinions expressed here represent my own and not those of my employer, nor current or previous. All content is published "as is", without warranty of any kind and I don't take any responsibility and can't be liable for any claims, damages or other liabilities that might be caused by the content.


C# - Always valid value objects

Saw a video that was talking about the fact that using value objects provides you with always valid objects. Then it showed usage of the new'ish C# minimal construct for a record, using the positional syntax, defining some properties and then went on with life. This does of course not provide you wi…

Daniel Wertheim Daniel Wertheim

UTF-8 BOM adventures in C#

Time for a quick look at UTF-8 encoding and byte order marker (BOM). Lets jump right into some code. You are probably going to nail this as you most likely will be alert now, given the title and all, but would you have expected this test to pass? [Fact] public void Utf8Strings() { var initial =…

Daniel Wertheim Daniel Wertheim