C# 11 – Raw string literals

Raw string literals are a new format which enables you to include whitespace, new lines, embedded quotes, and other special characters in your string, without requiring escape sequences. How does it work: A quick example: This will output the following: Whitespace before the closing sequence The whitespace before the closing double-quotes controls the whitespace which…

How to switch to C# 11

Feature is not available in C# 10.0. Please use language version 11.0 or later. There are two ways to approach this: Language version is greyed out and cannot be modified The Language version cannot be changed from the Properties window of the project. The version is linked to the target .NET framework version of your…

C# – Best way to Throw Exception If Null

.NET 6 introduced a few new helper methods to deal with throwing exceptions, and one of them is ThrowIfNull. The usage is simple: The method will throw a ArgumentNullException when myParam is null. It will do nothing otherwise. ThrowIfNull can take in two parameters: Note: paramName uses CallerArgumentExpressionAttribute to retrieve the name of your parameter…

| |

The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

This error usually means that there is a mismatch between the AppService Stack and .NET version and your app’s target framework. This can happen when you upgrade your web app, but you do not update the runtime of the App Service. This is a common occurence for ASP.NET MVC and Web API projects going through…

|

Azure Functions vs WebJobs – Which to choose

Both are code-first technologies targeting developers (as opposed to design-first workflow services). They enable the orchestration and integration of different business applications into a single workflow and provide more control over the performance of your workflow plus the ability to write custom code as part of the business process. Azure WebJobs WebJobs are a part…

| |

Which to choose: Logic Apps vs Microsoft Power Automate

Both are design-first technologies, meaning that they provide user interfaces allowing you to draw-out your workflows as opposed to coding them. Other similarities between the two: They both can accept inputs Can run actions Able to control the workflow using conditions Can produce outputs Logic Apps Logic Apps is a service provided by Azure which…

| |

Creating a cross-platform chat app using Xamarin Forms and SignalR

In less than 5 minutes. First step is to create your Xamarin Forms projects – start with a blank shell app – and add an additional blank ASP.NET Core project to the solution – we will use it to host our SignalR backend. Once the projects are setup, we begin by implementing the ChatHub which…

How to fix WordPress Missing MySQL extension after MultiPHP upgrade on HostGator

After upgrading your WordPress site’s PHP version using the MultiPHP manager to use PHP 7, you might be running into the following error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. This is caused by an obsolete handler in your .htaccess file. Fixing it OR Save the file…