Blog Posts for: Dotnet

Using version ranges for package dependencies in .NET project files
25 May 2018

When adding package references in your projects files, you are not limited to specifying a specific version. You can specify a version range instead.

Determine the ConsoleColor from a 24 bit hexadecimal color code
17 April 2018

The .NET Console is limited to 16 colors. Learn how you can convert a hexadecimal color code to one of the 16 colors available in the console.

Determine the GitHub repository from the working directory
11 April 2018

Determine whether the current working directory is part of a Git repository, and if so, retrieve information for the remote GitHub repository.

Using ANSI colour codes in .NET Core Console applications
05 April 2018

Demonstrates how to use ANSI colour codes in .NET Core console applications, as well as the limitations of this on Windows.

Retry failed network requests with Polly
02 April 2018

Polly is a fault-handling library which allows you to-among other things-implement a retry policy in your applications. This is ideal in situations where you have flaky network connections with intermittent connectivity issues.

Quick Tip: Pass arguments to your app when using the .NET CLI
27 March 2018

A quick tip to demonstrate how you can pass arguments to your application using the .NET CLI

Using custom converters in JSON.NET: Array or Object?
06 March 2016

Custom converters in JSON.NET allow you to write custom logic when serializing or deserializing JSON. In this post I look at an example where the JSON returned could be either an object or an array.

Using JsonExtensionData with JSON.NET
07 February 2016

The JSON.NET JsonExtensionData attribute allows you to serialize elements of a JSON document which does not have matching properties to a collection.