Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
What's New in C# 12: A Practical Guide with Exercises
Rating: 4.3 out of 5(130 ratings)
721 students

What's New in C# 12: A Practical Guide with Exercises

Learn about the new features in C# 12, through theoretical videos and practical exercises.
Last updated 11/2023
English
English [Auto],Turkish [Auto],

What you'll learn

  • What's new in C# 12
  • Motivations behind the new features
  • Scenarios for using the new features
  • Exercises to practice implementing the new features

Course content

4 sections23 lectures1h 39m total length
  • What are Primary Constructors1:54

    Explore primary constructors in C# 12, adding parameters to class or struct declarations for internal use, with a record-like syntax, and guidelines that parameters are not properties unless exposed.

  • Primary Constructors - Before and after5:37

    Explore primary constructors in C# 12 by creating a customer class with parameters in parentheses, and show how to initialize data and expose public properties.

  • Uses for dependency injection6:23

    Demonstrates dependency injection with a translation service via a primary constructor, using a service collection to register a Google translation as a singleton.

  • Constructors and base class initialization4:00

    Explore how primary constructors in C# 12 affect parameterless constructors, compare class vs struct behavior, and learn to initialize base constructors using this to enable parameterless instantiation.

  • Applying Primary Constructors in a project2:21
  • Solution to Primary Constructors exercise3:59

    Apply primary constructors to simplify the book class and related models. Inject iBook service via constructors in the Books Controller and verify endpoints with Swagger.

  • Resources0:01

Requirements

  • C# language basics

Description

Hello My name is Hector Perez, Be welcome to the course, "New features in C# 12, a practical guide". I am Microsoft MVP and software developer with more than 10 years of experience

C# is the powerful programming language created by Microsoft, placed among the most popular and used today

The reason, is that with C# you can create almost any type of application, from video games, to mobile applications, to web projects

With the release of a new version of .NET every year, new features are added to C#, making it an increasingly flexible and powerful language

In this course, you will learn about the main features of C# 12, the reason behind the incorporation of each of them into the language, as well as exercises that will allow you to get hands-on to practice what you have learned

At the end of the course, you will know what are the main new features of C# 12 and how to use them in your projects

Some of the topics that we will see in the course are:


  • Primary Constructors

  • Collection Expressions

  • Optional parameters for lambdas

  • Param array parameters for lambdas

  • Alias any type

  • Among other topics

To have a good use of the course, it is recommended to have basic knowledge of C#

What are you waiting for to update your C# knowledge? See you in the course

Who this course is for:

  • C# Developers
  • .NET Developers in General