Endjin - Home

C# 8

Why You Should Buy My Book: Programming C# 8.0

by Ian Griffiths

Ian spent a big chunk of last year writing an update to his book, Programming C# 8.0. Books continue to be Ian’s preferred source of learning because nothing else offers the combination of depth, breadth, and coherence. His goal with Programming C# 8.0 (and its predecessors) was very clear: to write the book that he would want to read if he were learning C# today. It is Ian’s attempt to distil around 18 years of experience with C# (part of almost 30 years of work as a programmer) into a coherent, complete description of what you’ll need to know to be productive today in C#.

C# 8 Positional Patterns Custom Deconstructor Pitfall

by Ian Griffiths

The ‘positional patterns’ added in C# 8 support types with custom desconstructors. However, the way this works might always be quite what you would expect. This article shows a surprising behaviour, and explains how it arises.

C# faux amis 3: variable declarations and type patterns

by Ian Griffiths

In this, the final article in a series on the potentially deceptive nature of some new features in C# 8, Ian Griffiths shows how using var can sometimes result in better compile-time type checking than using an explicit type. He reflects on the evolution of C#, and what we can learn from this.

C# v8.0 introduces various new patterns. In this article, part of a series on how the evolution of the language has added complexity, Ian Griffiths shows how the strong resemblance between the new Positional Patterns and Deconstruction can be misleading.

C# faux amis 1: discards and underscores

by Ian Griffiths

Visual Studio 2019 saw the arrival of C# v8.0. This article shows the first of a series of examples of how friction can arise when integrating new features into a mature language: the relatively late addition of ‘discards’ causes some surprises.

C# 8 surprising patterns

by Ian Griffiths

Visual Studio 2019 saw the arrival of C# v8.0. A programming language cannot evolve for 20 years without developing a few quirks. Ian Griffiths writes about a surprising aspect of the new pattern matching features, and what this reveals about how the language has changed.