C# 10 Features You Need to Know About

preview_player
Показать описание
There are so many features in C# 10 that I have fallen completely in love with that help simplify source code and make development even more enjoyable. I break down my favorite features that you will actually use every day when developing apps with .NET 6. Not targeting .NET 6 yet? Don't worry, I will show you how to use C# 10 features in your older projects too!

Chapters:
00:00 - Introduction
00:50 - record class, record struct, struct updates
03:00 - File-scoped namespaces
04:34 - Global & Implicit usings
08:22 - Project specific implicit usings
09:46 - New lambda expression improvements
11:40 - Enabling C# 10 in older projects
13:50 - Wrap-up

Links:

Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

Follow:

My Setup:

#csharp10 #dotnet6 #csharp #dotnet
Рекомендации по теме
Комментарии
Автор

How can I make VS2022 generate a file with File-scoped namespaces by default?

vladmartian
Автор

Shallow Copy actually. Properties that are reference objects copy over the reference, and do not copy deep.

Suamere
Автор

Is there any performance penalty for implicit global usings vs declaring only the needed ones at file level?

prashantio
Автор

Does this work with Xamarin (forms 5.0 or other)? Thanks James for your videos!

bsafer
Автор

using c#10 in an old project, that also are connected to CI/CD pipelines, will be fine? or the pipelines have to have something especial, like an specific msbuild version ?

ddieppa
Автор

James, I didn't get the trick to convert old projects to C# 10. When I try to do it for my net48 project I get an error and the compiler ask for NET6. Do I need to add multiple targets frameworks to my csproj? I'm already using VS 2022.

dougcunha
Автор

Great video James. Which version introduced record? Or it’s there since beginning?

prashantio
Автор

You should be a teacher. You would be great at it. 😁👍
I am waiting for someone to create an entire huge C#10 course with NETCore-6 and ASP tutorial all using VS-2022.

TwstedTV
Автор

James, are you already using VS22? What are your feelings?

tarlanismailov
Автор

What font are you using in visual studio text editor? Great video

lpsoldier
Автор

Sneaking Microsoft.* namespaces alongside System.* namespaces. Nicely done!

tarraknyc
Автор

anyway, global using make a big progress. I hate the semicolon and hope someday I do not have to type it at the end of every single line

nicholasma
Автор

Finally we can get rid of using everywhere

tuanlam
Автор

Nice way to sneak in non-standard (Microsoft.**) namespaces alongside System.* namespaces 😏

tarraknyc
visit shbcf.ru