As some of you may know, many of the features in C# light up through “duck typing”. Duck typing is where you accept an object that behaves in a certain way (i.e. has certain methods, properties, etc.) instead of a specific type. One of these features is async/await (or the Task-based Asynchronous Pattern). The compiler doesn’t expect
Task<T> specifically, it looks for a
GetAwaiter method that returns an awaiter. This opens the door for some fun...
We’ve been working with C# for many years now and the new additions to the language are very exciting. They’re focused on immutability. Well, actually, the Microsoft documentation seems to suggest they’re more focused on performance, but they go hand-in-hand: the less you can modify, the faster things are.