Compiling stand-alone file in classic .NET vs Dotnet core
I realized that compiling a single-file program became much more complicated in Dotnet core compared to regular .NET. For starters, here’s how you run a Python file: python foo.py Here’s […]
I realized that compiling a single-file program became much more complicated in Dotnet core compared to regular .NET. For starters, here’s how you run a Python file: python foo.py Here’s […]
Web sockets were invented to push data from web server to clients. So, one would expect that sending data to a web socket would look something like this: void OnNewDataReady(string […]
This feature has apparently existed for years, but I found out only now. CLR has an equivalent of HTTP redirect for types, it is called You can move a class […]
I was experimenting with creating new projects out of templates in VS 2019, and to my surprise ran into a lot of trouble and error messages. One time it told […]
“Any sufficiently advanced technology is indistinguishable from magic” Athur C. Clarke While reviewing some code, I stumbled upon a class that receives an ObservableCollection<ILogFormatter> in the constructor. I discovered that this […]
TL;DR: wrapping existing method DoSomething(MyData data), with an identically named generic extension method DoSomething<T>(T data) is a bad idea, since it erases compile-time type checking. DoSomething() may now be called […]
I created an ASP.NET core project with docker support. Good thing: it works. Bad thing: the “dev” image it creates does not really contain application code. The code is added […]
It turns out that after re-registering type as a singleton in Unity calls to container.Resolve() return a new instance. This may lead and have led to ugly bugs if your code relies […]
Recently I’ve got another reminder why constructors should be simple. The situation in a nutshell: class BaseHandler subscribes to an observable in its constructor. The handler is virtual, class DerviedHandler adds incoming […]
This Friday I wrote a unit test and to my astonishment I have found that “a” < “A” < “ab”, with .NET InvariantCulture and InvariantCultureIgnoreCase string comparers. That means that .NET […]