What's new in C# 10

  Рет қаралды 87,107

dotnet

dotnet

Күн бұрын

aka.ms/dotNETC...
C# 10 brings many improvements focused around enabling cleaner and simpler code in many scenarios. 👨‍💻 Slides & code: aka.ms/dotnetc...
🎉 .NET 6 Release Blog: devblogs.micro...
⬇ Download .NET 6: aka.ms/dotNETC...
🙋‍♀️🙋‍♂️ Get your questions answered on the Microsoft Q&A for .NET: aka.ms/dotnet-qa
💭 Join the .NET Tech Community Forums: aka.ms/dotnet/...
🏫 Learn C#, F#, and .NET with free self-guided learning from Microsoft Learn: aka.ms/learndo...
#dotnet6 #dotnetconf #dotnet

Пікірлер: 84
@MajeureX
@MajeureX 2 жыл бұрын
Here's the list of new features covered in the video! 0:48 Record structs and with expressions 4:15 Anonymous types 4:50 Custom parameterless constructor for structs 6:50 Field and property initializers for structs 7:53 File-scoped namespace declaration 10:05 Global using directives 12:09 Implicit using directives 14:28 Lambda improvements 21:12 Type inference for lambdas and method groups 22:50 Interpolated strings performance optimizations
@lnk77
@lnk77 2 жыл бұрын
thank you, the clip is a nightmare, just a long story of BLA
@jcespinoza
@jcespinoza 2 жыл бұрын
Thanks a lot, hero!
@JorgeEscobarMX
@JorgeEscobarMX 2 жыл бұрын
You deserve a medal man
@ivcbusinesssystems6613
@ivcbusinesssystems6613 2 жыл бұрын
This is VERY helpful!!! I have no idea who green lit this rambling, but they need to stop and lay things out like you have!
@Lollertube82
@Lollertube82 2 жыл бұрын
These two old programmers are a pleasure to listen. They have that thing about them that says, yeah, been there, done that, and now they are just having fun with the thing they do.
@sylvainr0
@sylvainr0 2 жыл бұрын
They look young to me :)
@RubenHeerenDev
@RubenHeerenDev 2 жыл бұрын
*I love C#*. You guys take great features from other languages and implement them in a clean way.
@keja0
@keja0 2 жыл бұрын
Every time when converting to block-scoped namespace and the indentation jumps a level back my heart jumps as well. Love it! ❤️
@FurryDanOriginal
@FurryDanOriginal 2 жыл бұрын
I love the direction C# is heading. Definitely my cup of tea. Great work!
@mikhailnikitin1697
@mikhailnikitin1697 2 жыл бұрын
Would be so much better if when the code is changed by the speaker, the screen shows that code and not the speaker looking into a screen which we can't see...
@TS-yf8hq
@TS-yf8hq 2 жыл бұрын
Dotnet conf is my new Super Bowl! Cheers
@mwimb6716
@mwimb6716 2 жыл бұрын
wow, these guys really did some great work on the language didnt they!
@IIARROWS
@IIARROWS 2 жыл бұрын
Jokes on you: I never put 4 spaces at the beginning of my files lines. I use 1 tab. Like every non-psychopath developer.
@jasarwadlow9406
@jasarwadlow9406 2 жыл бұрын
Just my 2 cents, but i really dislike the camera work here. The constant jumping from code to presenters to different angles of them to zoomed out panning shots. Maybe I'm just old, but that was distracting af, and I could barely read and appreciate the code without pausing every few seconds. I also dislike the presentation style of some of the other presenters. Especially the ones on the Minimal API talk. Cringey and full of fluff. At least these two are coherent and somewhat straight-to-the-point
@bobmcbob4399
@bobmcbob4399 2 жыл бұрын
And that animated background with the space ship flying about on loop
@satheeshan
@satheeshan 2 жыл бұрын
Nice intro into some of the new features
@nanvlad
@nanvlad 2 жыл бұрын
what' the problem to simplify delegate even more? Let's say var a = => 3 : 4; is it obvious that is Func a = (b) => b ? 3 : 4; ? Or to be more precise let's write var a = _ => ? 3 : 4; What do you think?
@yetanotherdex
@yetanotherdex 2 жыл бұрын
when do we get file-level classes?
@egonknapen4079
@egonknapen4079 2 жыл бұрын
I have a 28" 16:9 monitor, 4K (because 16:10 or 3:4 isn't really an option anymore. If I make my visual studio fullscreen most of the time half the editor window on the right side of my code is white and empty. And you guys are complaining about removing those few idents on the left side... And then you guys are complaining about vertical space, a few usings in the beginning. Half the foreign projects I see have like a big comments section on top, and default installation and yours too, add a line of 'reference' to every line. Talking about priorities...
@leandrocasas90
@leandrocasas90 2 жыл бұрын
We just gained some serious real state in our code files.
@MadaFakaTOO
@MadaFakaTOO 2 жыл бұрын
Chapters or timestamps would help a lot.
@fredchuks7822
@fredchuks7822 2 жыл бұрын
How do I call methods in c sharp 10
@3wsystems663
@3wsystems663 2 жыл бұрын
a good online code c# 10 manual??
@doctor9101
@doctor9101 2 жыл бұрын
Can we have anonymous classes derive from another class
@YBXtreminal
@YBXtreminal 2 жыл бұрын
How you do the arrow symbol (⇒) insted of =>?
@ecblanco
@ecblanco 2 жыл бұрын
It's because of the font. They are the same, but because of the font looks like an actual arrow.
@WildPork
@WildPork 2 жыл бұрын
try "Cascadia Code" font
@jackwu9613
@jackwu9613 2 жыл бұрын
What font does he use?
@jatin.sanghvi
@jatin.sanghvi 2 жыл бұрын
Fira Code
@Печенькасмаком-й3ъ
@Печенькасмаком-й3ъ 2 жыл бұрын
@@jatin.sanghvi I think it's the "Cascadia Code" font.
@jatin.sanghvi
@jatin.sanghvi 2 жыл бұрын
@@Печенькасмаком-й3ъ Check the 'g' in 'get;'. Not Cascadia Code
@treyquattro
@treyquattro 2 жыл бұрын
those of us who have been around remember record and with in Pascal
@ZintomV1
@ZintomV1 2 жыл бұрын
I think this mollycoddle approach for new C# programmers will really bite the community in the butt later down the line.
@lcfb2009
@lcfb2009 2 жыл бұрын
Someone can answer about c# performance? Which language has better performance: Java or C#?
@psdmaniac
@psdmaniac 2 жыл бұрын
do not troll
@lcfb2009
@lcfb2009 2 жыл бұрын
@@psdmaniac it is not a troll. Is there a comparative benchmark anywhere? I want to migrate a project from Java to C#.
@psdmaniac
@psdmaniac 2 жыл бұрын
@@lcfb2009 6:20 => kzbin.info/www/bejne/d3expp1-f8uAqrc
@masoodahmed4718
@masoodahmed4718 2 жыл бұрын
Ok here is a joke for you. Why do java developers wear glasses? because they see sharp enough not to bring in every other kind of programming paradigm in one language. get it? No? ok I will see my self out.
@LukeAvedon
@LukeAvedon 2 жыл бұрын
LOL!
@jubinjacob3951
@jubinjacob3951 2 жыл бұрын
instead of destroying the language syntax . focus on performance and improvements . everybody used to love c# because most of them loved the beautiful java like syntax , now it's all gone , I hate c# now ,
@swordblaster2596
@swordblaster2596 2 жыл бұрын
Making syntax less clear in the name of "reducing code" is the surefire way to tell a language is on path to hell
@_Mentat
@_Mentat Жыл бұрын
I agree. It becomes cultish and only the cognoscenti understand it; and they love that of course. Meanwhile industry needs maintainable code where there is only _one_ way to skin any given cat. If there are two ways to write some code then one of them is wrong and shouldn't be in the language.
@michaelderamus662
@michaelderamus662 2 жыл бұрын
Microsoft pays people to promote C#?
@pavelsvec5073
@pavelsvec5073 2 жыл бұрын
Killing the language goes on.
@RenegadeVile
@RenegadeVile 2 жыл бұрын
How so?
@bobweiram6321
@bobweiram6321 2 жыл бұрын
@@RenegadeVile Lot's of frivolous code reduction features and no real improvements in c#'s expressiveness. I've never heard anyone complain about Using or namespace statements statements as being particularly verbose. Parameterized strings, on the other hand, has been a god send feature and enhances the developer experience. I would be more excited if they supported algebraic types like F# and Swift as it would improve code quality.
@RenegadeVile
@RenegadeVile 2 жыл бұрын
@@bobweiram6321 Whether true or not, that is not killing the language. This guy said they are killing the language and I want to hear from HIM, why he thinks that.
@jmoralesv03
@jmoralesv03 2 жыл бұрын
​@@RenegadeVile I don't know we will get an answer from Pavel Svec anytime soon, let's wait and see. Please like this comment when that happens.
@EspenSkaufel
@EspenSkaufel 2 жыл бұрын
@@bobweiram6321 I'm afraid I have to disagree. If you have not heard anyone complain about the verbosity of C# perhaps you have not been listening?
@okerror1451
@okerror1451 2 жыл бұрын
Really cool and in-depth stuff guys. Thanks!
@vuhoangdung
@vuhoangdung 2 жыл бұрын
some features are copied from F# which is a good thing
@r1pfake521
@r1pfake521 2 жыл бұрын
What happend to static interface methods and generic math improvements? :(
@OttoAkama
@OttoAkama 2 жыл бұрын
Demo Driven Design 😎
@bobweiram6321
@bobweiram6321 2 жыл бұрын
LOL! So far all the "new features" offer very little to no value to me. They merely reduce the amount of typing required. I never heard anyone complain about Using statements as being too verbose or taking too much screen space, nor has anyone wished the compiler could infer types better. What I wish C# had was support for algebraic types, which are very powerful and would definitely enhance the development process.
@RenegadeVile
@RenegadeVile 2 жыл бұрын
@@bobweiram6321 It might not be groundbreaking, but it's still handy stuff. Not sure what the big deal is.
@steefen5281
@steefen5281 2 жыл бұрын
Thanks for all the great videos!
@philippelhaus
@philippelhaus 2 жыл бұрын
Man i love c#
@kevinn1729
@kevinn1729 2 жыл бұрын
My first love
@tuberklz
@tuberklz 2 жыл бұрын
"maybe" already
@tubeashu
@tubeashu 2 жыл бұрын
#dotNET what do you recommend, if we are using global using and we have say many projects/files and only one project/file have namespace conflict. How we can handle such scenario ? Should conflicted namespace be added explicitly in each project/file or is there a way to resolve conflict in conflicted file itself.
@ZintomV1
@ZintomV1 2 жыл бұрын
08:24 - The programming meta in 2022 for sure
@GAURAVGUPTAER
@GAURAVGUPTAER 2 жыл бұрын
Thanks
@SynthacticSugar
@SynthacticSugar 2 жыл бұрын
Thanks for all the good stuff you have brought to the language during its development! I have been using it since it's release for almost 20 years now! But these small alternative ways of writing things that was already simple enough is not very helpful in my opinion. As a developer I strongly favor consistency over slightly less verbose alternatives. I wish you could focus more on fewer features that really makes a difference in what we can do. There are many more doors to open!
@Andrew-es6yt
@Andrew-es6yt 2 жыл бұрын
As a developer, I favor brevity and simpicity. And also I want C# to stay competitive. They are doing the right thing.
@kalleguld
@kalleguld 2 жыл бұрын
But how about record interfaces? and record enums? :)
@justind6983
@justind6983 2 жыл бұрын
Should be able to use an interface,right?
@hongyuan
@hongyuan 2 жыл бұрын
I would like to see the intelliSense to appear again when I use backspace to modify in C# -- just as it is in VB.
@christianmontagx8461
@christianmontagx8461 2 жыл бұрын
C# Becomes more and more VB. It supports more and more bad coding behaviours. If you need static initializers for a struct use a factory, not a struct-constructor.
@paulward8087
@paulward8087 2 жыл бұрын
I still don't get the point to records. Am I alone with this?
@keithpatrick156
@keithpatrick156 2 жыл бұрын
I don't either. I'm not seeing why they don't just roll that functionality directly into the type system rather than add a new "thing" that can be either a class or a struct.
@paulward8087
@paulward8087 2 жыл бұрын
@@keithpatrick156 at this point a record is basically just a normal class anyway ... The only thing that's changing is how they are used in code. Are they doing something different in the compiler or how the memory is allocated?
@deanrettig7791
@deanrettig7791 2 жыл бұрын
If MS is really interested in reclaiming vertical space, they should consider defaulting opening braces to the end of the previous line.
@DrawTheLine2
@DrawTheLine2 2 жыл бұрын
Thanks for using DARK MODE - next time. My eyes are destroyed.
@DrawTheLine2
@DrawTheLine2 2 жыл бұрын
@Daniel Prokhorov Your reply is very stupid. My comment would make a future video better. Yours??? Also, I wanna see who is the cry baby me or you: let's meet and say this to me face to face. C'mon, I can deal with your low level kind, np!
What's New in C# 11 | .NET Conf 2022
30:28
dotnet
Рет қаралды 27 М.
Every New Feature Added in C# 12
14:19
Nick Chapsas
Рет қаралды 151 М.
Please Help This Poor Boy 🙏
00:40
Alan Chikin Chow
Рет қаралды 16 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 12 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 98 МЛН
What’s new in C# 13 | BRK186
46:27
Microsoft Developer
Рет қаралды 45 М.
10 C# Libraries To Save You Time And Energy
33:59
IAmTimCorey
Рет қаралды 207 М.
C# 9 Language Features
22:39
dotnet
Рет қаралды 62 М.
Every single feature added in C# 11
27:07
Nick Chapsas
Рет қаралды 111 М.
You are doing .NET logging wrong. Let's fix it
25:29
Nick Chapsas
Рет қаралды 173 М.
What's new in .NET 8 & C# 12 - Filip Ekberg - NDC London 2024
58:49
NDC Conferences
Рет қаралды 18 М.
Blazor in 100 Seconds
2:33
Fireship
Рет қаралды 580 М.
New Blazor WebAssembly capabilities in .NET 6
29:11
dotnet
Рет қаралды 98 М.
How I Structure Program.cs on ASP.NET Projects
15:40
Gui Ferreira
Рет қаралды 4 М.
Please Help This Poor Boy 🙏
00:40
Alan Chikin Chow
Рет қаралды 16 МЛН