Загрузка страницы

C# 10: New features and examples that are not in C# 9 (.NET 6)

C# 10 development is in full swing, and we try out five new features in C Sharp 10, using an ASP.NET Core 6 Web API inside Visual Studio 2022 preview.

These features are amongst a number of updates that are being applied to C# when .NET 6 is released, expected in November 2021.

Watch the video where we show you how you can start using C# 10 right now!

The new features we cover are:

● File-scoped namespace
Being able to use a namespace in a file, without having to wrap curly braces around it.

● Record structs
C# 9 introduced the record class feature. C# 10 goes further and you can now apply record structs. Handy if you want to make a struct immutable.

● Constant interpolated strings
Interpolated strings allow you to insert an object into a string without coming out of it. Now you can set an interpolated string as a constant.

● Extended property patterns
Handy if you are doing a condition on a nested property. You can now use a dot to get the nested property, rather than using curly braces.

● Global using directive
Being able to import namespaces that are commonly used into a single file, so they don't have to be imported in each individual file.

💻 Download the source code 💻
https://www.roundthecode.com/asp-net-core-examples/try-out-c-sharp-10-new-features-using-visual-studio-2022?utm_source=youtube&utm_medium=referral&utm_campaign=C%23+10+new+features+and+examples+that+are+not+in+C%23+9

► Chapters
0:00 C# 10 development in full swing
0:44 File-scoped namespace
1:37 Record structs
4:38 Constant interpolated strings
6:52 Extended property patterns
9:39 Global using directive
10:43 How to use C# 10
11:15 C# 10 review

► More information: https://www.roundthecode.com/dotnet/c-sharp-10-new-features-examples-not-in-c-sharp-9?utm_source=youtube&utm_medium=referral&utm_campaign=C%23+10+new+features+and+examples+that+are+not+in+C%23+9
► .NET 6, C# 10 and Visual Studio 2022 playlist: https://www.youtube.com/playlist?list=PLNLqfquXi7rs5tDDbxsd8Z-_z-6FYH0m_

#csharp #dotnet #visualstudio

Видео C# 10: New features and examples that are not in C# 9 (.NET 6) канала Round The Code
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
20 августа 2021 г. 22:00:11
00:11:38
Яндекс.Метрика