C#7 and Visual Studio 2017 - Kathleen Dollard
The newest version of C# makes every day code better while it moves us a little closer to functional programming. This talk covers how the new features simplify your current code without requiring obscure ways of thinking. Pattern matching lets you simplify casting and checking before using a value. Pattern matching also makes beautiful switch statements, but you need to understand new rules and syntax to make this work. Prior to C# 7, the available options for returning multiple values from a method could most kindly be called contortions. C# 7 tuples solve this and other problems because they neatly and efficiently wrap transient data. Deconstruction, even overloaded deconstruction, let’s you extract just the values you want. And wait, wait, there’s more…you can use “out vars” to skip extra declarations. Learn about these features along with literals, local functions and a couple of niche features. You’ll leave ready to upgrade to C# 7 and you’ll understand the role it plays in our gradual move toward functional programming.