5 New Features in C# 9 (not including Records)

IAmTimCorey November 18, 2020
Video Thumbnail
IAmTimCorey Logo

IAmTimCorey

@iamtimcorey

About

My goal is to make your life easier, specifically when it comes to learning software development. I remember what it was like to not know even what questions to ask. In every video I do, I try to answer those questions. You will notice that I don't usually do quick videos. That's because I would rather help you understand rather than just padding my watch percentages. If you want more in-depth training, feel free to head over to my website (https://www.iamtimcorey.com) where I have courses dedicated to C#, SQL, and more.

Video Description

C# 9 is out and there are a bunch of new features. But do we really need them? Just because they are new does not make them valuable. In this video, we will look at five new features. We will identify how to use each and then talk about where they are useful (as well as where they are not useful). We won't be covering records because they deserve their own video, which comes out in a couple of days. Source code: https://www.iamtimcorey.com/downloads/?code=FiveFeaturesCSharp9 Mailing List: https://signup.iamtimcorey.com/ Purchase courses: https://iamtimcorey.com 0:00 - Intro 0:55 - Getting started: Visual Studio version 1:46 - 1. Top Level Calls ... 4:23 - /* Note: Inline parameter name (VS feature) * / 8:43 - /* Note: .Net 5 vs .Net core * / 11:07 - 1. ... Top Level Calls 18:55 - Why top level calls? 23:20 - 2. Initial setter s 32:28 - 3. Known object type shorthand instantiation 40:36 - Recap and creating new demo Blazor app 42:30 - Demo Blazor app "fetch data" 44:17 - Improving Demo Blazor app "fetch data" code 47:45 - 4. Relational pattern matching in switch expression 54:18 - 5. Logical pattern matching in switch expression 1:04:24 - 6. "is not" pattern 1:08:30 - Recap 1:08:58 - Summary and concluding remarks Thanks to Ralfs HBK for the chapter breakdown