Quick tip: Using format strings with string interpolation in C#

String interpolation syntax introduced in C# 6 provides a convenient and readable alternative to string.Format. I have used it many times, but only recently have I learned it supports format string syntax as well, which was previously the reason I had to fall back to using string.Format. For example:

Can be written succinctly using

Microsoft Build 2018 – Day 2

Third article from my Build 2018 series focuses on day 2 of the conference. We will go through all the cool things from the first keynote, check out a few talks, get the best burger in Seattle and finish ourselves off with some yummy ice cream. Stay tuned!

Tip: Force-reinstall NuGet packages

NuGet is a great package manager, but sometimes it misbehaves and packages are either not properly downloaded or are not properly included in your project. Whenever you come across this, I recommend doing a force-reinstall of all packages. In Visual Studio go to Tools -> NuGet Package Manager -> Package Management Console . In the

Connect(); 2017

Another year has come and with it the fourth annual on-line Microsoft Connect conference. Between 15th and 17th November you could watch the newest goodness from Microsoft for all developers on all platforms. Two main keynotes were dedicated to intelligent cloud and building intelligent applications of the future. Let’s see what Scott Guthrie (of course

Using custom nuget.exe in VSTS build process

Soon after the release of Visual Studio 2017, the Visual Studio Team Services team has added a Hosted VS2017 build agent that has support for all the latest and greatest technologies. Unfortunately although the build task with Visual Studio 2017 is itself present, the newest version of NuGet wasn’t added, yet. Fortunately, it is possible to use

Adding Hyper-V-less boot entry with PowerShell

Developers often encounter the need to run virtual machines using VirtualBox and Hyper-V-based mobile emulators on the same machine (for example Windows Mobile or Visual Studio Android Emulator). Unfortunately only one of the two can be enabled at once. The easiest solution is to create two boot entries and disable Hyper-V in one of them. CMD

C# Builder pattern with inheritance

The Builder pattern is very helpful in case you need to encapsulate and simplify creation of a complex object. Together with the fluent interface pattern it can result in a very nice API that can be a part of your library and is immediately clear and usable for other developers. Now what if we invite inheritance to the party?