Skip to content

brminnick/csharp-workshop

Repository files navigation

C# Workshop

NDC London 2019

Hosted by Bill Wagner

Become a better C# programmer: more Value, more Expressions, no Waiting

Over the past few releases, C# has added features that greatly improve productivity.

In this workshop, you’ll learn scenarios where these new features make you more productive, and improve the clarity of your code. You’ll get a guided tour through the async and await wilderness. You'll start with basic uses where async and await work like magic. From there, you'll learn common practices and how async tasks compose. You'll dive into enough of the implementation details to understand how to apply async practices. After working through these different practices, you'll emerge from the wilderness understanding how to write clear, correct and safe async code. From there, you'll work through everyday scenarios where modern C# frees itself from the shackles of history. You'll see new ways to work with text, new expressions for control flow, and new ways to bend the type system to your will. You’ll learn:

  • Getting started with the basics of async and await
  • Distinguish asynchronous programming and parallel programming
  • Compose asynchronous method calls throughout your code
  • Understand the pitfalls of async void
  • Designing async APIs
  • Advanced async and Task based programming
  • How string interpolation makes formatting strings much easier and clearer.
  • How to create compound assignments and comparisons using Tuples and Deconstruction
  • How to simplify iterators and async error handling using local functions
  • How to simplify error reporting using throw expressions in expression bodied members.
  • Write more performant code using value types safe pass-by-reference
  • How to use Pattern Matching to create algorithms that extend existing types

Computer Setup:

Attendees will need to bring a laptop with one of the following setups:

  • Windows: Laptop running Visual Studio 2017, or Visual Studio Code
  • Mac: Laptop running Visual Studio Code
  • Linux: Laptop running Visual Studio Code

Recommendations for Exercises

  1. We're here to learn, not to win arguments. Some exercises will spark debate. Listen and learn. what answer your group finds is much less important than why you chose that answer. A related point is that you will learn from other groups' opinions, and teach by explaining your group's opinions.
  2. Every person should be heard.
  3. Change roles often in pair programming exercises.