Using-declarations in C# 8.0
One of new language features of C# 8.0 is support for using declarations. These declarations enable shorter syntax for declaring disposable variables we want to dispose. Also using declarations give us a little bit cleaner code while compiler makes a dirty work of producing correct code that takes care of disposing disposable variables.
Automated date based versioning for ASP.NET Core assemblies using Azure DevOps
I needed automatic version numbering based on current date when web application is built. It was wish by some customers and in their projects it’s okay with it. As their code is covered with automated tests and other diagnostics I’m using Azure DevOps as build server and this is where I made automated date based versioning work.
Reading GPS coordinates of photo on ASP.NET Core
During one of my ASP.NET Core classes I made demo about how to read GPS coordinates from photo and display location on a map. I took my favorite photo of beer kiosk in Krakow and displayed location of this kiosk on map. This blog post describes my experiment on getting GPS coordinates from EXIF data in ASP.NET Core application.
Building offline Blazor application
I made one small experiment and tried to get simple client-side Blazor application running on browser in offline mode. Yes, offline – visit application page once, turn out internet connection, open browser, type in application URL and it just runs. This blog post is short illustrated overview of my experiment.
String repeat method for C#
C# doesn’t have built-in function to repeat a string. There are different version for string.Repeat() available in internet and it’s up to reader to find out which version works better. Here is the list of most popular implementations I found across the web. I list my findings here with the results of simple performance test.
ASP.NET MVC error: It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level
Error when running ASP.NET MVC application from Visual Studio: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Stop inventing painful hacks, solution is here.