Тёмный
No video :(

C# 9.0: Pattern Matching 

Filip Ekberg
Подписаться 4,4 тыс.
Просмотров 17 тыс.
50% 1

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 46   
@PushInMatt
@PushInMatt 3 года назад
You explained all of these new patterns so well; I went from no knowledge of them to feeling like I could put them into my code in under 20 mins. Love the format of the videos :)
@FilipEkberg
@FilipEkberg 3 года назад
Thank you so much for the kind words! That makes me extremely happy to hear :)
@renehilgers
@renehilgers Год назад
This is the best video I've seen about pattern matching! And I think it is the most complete video about it! Very good explanations!
@Sonny0276
@Sonny0276 3 года назад
Great Video. Thank you for posting.
@aceplusplusplus7652
@aceplusplusplus7652 3 года назад
Thank you for this- great insight into Pattern matching, a foundation for my AI!
@FilipEkberg
@FilipEkberg 3 года назад
Thanks for watching!
@danielecerro3797
@danielecerro3797 3 года назад
I really like the format of these videos! Great explanation :)
@FilipEkberg
@FilipEkberg 3 года назад
That makes me very happy to hear. Thank you very much!
@Luca-rw8jx
@Luca-rw8jx 3 года назад
this work is underrated. thanks for doing this and looking forward to more csharp related content
@FilipEkberg
@FilipEkberg 3 года назад
Thanks so much for the nice comment!
@aquadury7354
@aquadury7354 2 года назад
Hey man! Thank you for your lectures, they are awesome, clear and concise. Came to your channel from your Pluralsight "Command Pattern" xD
@FilipEkberg
@FilipEkberg 2 года назад
Thank you so much for those kind words! I am happy you like it :)
@zankomag8322
@zankomag8322 3 года назад
I really like the way you present information. It's so simple to get it!
@DarshanaHashendra
@DarshanaHashendra 2 года назад
Great explanation , great content. Love to listen to your teachings.
@SolidJuho
@SolidJuho 3 года назад
All of these videos of new features of C# 9.0 are extremely well executed. They are short, informative and simple with great examples. It would be great to also have these from C# 8.0 which is also "relatively" new.
@NOCLAF-gw7nn
@NOCLAF-gw7nn 3 года назад
Thank you, it is the best tutorial i found for Pattern Matching with C#.
@Expertali66
@Expertali66 3 года назад
I just found this channel, and I am very glad that I did! Your description is very clear and the examples you use make it even easier to understand. Keep up the good work!
@FilipEkberg
@FilipEkberg 3 года назад
Thank you so much 🙏
@vhbil
@vhbil 3 года назад
I get excited about new language features too!
@FilipEkberg
@FilipEkberg 3 года назад
Glad I'm not the only one!
@marklord7614
@marklord7614 3 года назад
Great video. I'm happy about the patterns and the functional direction of C#. I would love to see discriminated unions come to C# 10...oh and keep the patterns coming too :-)
@FilipEkberg
@FilipEkberg 3 года назад
Thank you very much! You and me both. It's really exciting times for C#. What more patterns would you like to see?
@MiniplanePilot
@MiniplanePilot 3 года назад
Thanks for the video, a really useful overview of the types of pattern matching now available in C# 9.0. I really dislike the way the Positional pattern matching has been implemented because it requires me to go and examine the deconstructor for the object type, I'm not sure how this makes the code more readable.
@daonlyowner6631
@daonlyowner6631 3 года назад
Pattern matching in C# is now better supported than in F#.
@PhinioxGlade
@PhinioxGlade 3 года назад
The pattern syntax in this example if anything is less readable. It appears way more messy and for people unfamiliar with patterns would just be confusing.
@piotrw3366
@piotrw3366 2 года назад
Thank you for making this video! Can I ask you a question? In this code *if(n is 1 or 2 || true)* I was fully expecting to be able to use *or* instead of || but it throws an error. Does that mean that to add a 2nd condition we still need to use the logical operators || && ? Thanks!
@alexm6762
@alexm6762 3 года назад
don't like to add new keywords if you can wo them. instead of init you can write readonly set, instead of record you can write imho const class
@FilipCordas
@FilipCordas 3 года назад
I don't think they are keywords in sense like foreach or while are. They are more positional so you can still use the name as variable names.
@chammu6936
@chammu6936 3 года назад
Clear explanation. I have one small question. Can we define the .NET5 like this? .NET5 is the combination of .NET core and .NET Framework
@SalimNemoMakouche
@SalimNemoMakouche Год назад
Good explanation :) still it's not possible to write something like with rust or F# : match x { 1 => println!("one"), 2 => println!("two"), 3 => println!("three"), _ => println!("anything"), }
@PbPomper
@PbPomper 2 года назад
The only problem I have with this is that you can not test against variables, which you have to do 95% of the time. Using hard coded values is usually a big no-no in practice.
@michaelnurse9089
@michaelnurse9089 3 года назад
My pattern matching has detected you changed your profession. At the beginning you are a public speaker but at the end you are an author. Very suspicious.
@FilipEkberg
@FilipEkberg 3 года назад
I guess a lot can happen in 16 minutes and 40 seconds :)
@RoyZASTEROiD
@RoyZASTEROiD 3 года назад
Big thanks for easy explanation. What this code name? i know this is not method decloration, but what is the name of this code? anonym variable? or what? var (Name2, Rank2) = GetOfficer(); // what is this part name? : var (Name2, Rank2) and this. I understand this is method, but without name..? can u explain what is this?: (int Something, string Another) Whatever((int Neat, bool Cool) data) { return (data.Neat, data.Cool.ToString()); }
@FilipEkberg
@FilipEkberg 3 года назад
Thanks! The first one, that is known as a tuple. In your second example, you return a tuple with two fields (values): one integer named Something and one string named Another. The method accepts a named tuple which you call data, this tuple has two fields (values). The method then returns a new tuple which is constructed using the values from what you passed to the method. I hope this helps!
@RoyZASTEROiD
@RoyZASTEROiD 3 года назад
@@FilipEkberg big thanks, and sorry for my bad english
@djchrisi
@djchrisi 3 года назад
I sometimes feel sorry for the language team. They worked really hard on such great features and we consumers out there on the internet are only debating about stuff like: var x = new T() vs T x = new()....
@FilipEkberg
@FilipEkberg 3 года назад
They do an amazing job!
@wiilillad
@wiilillad 3 года назад
"Improvements"
@FilipEkberg
@FilipEkberg 3 года назад
Don't like them?
@yasser2768
@yasser2768 3 года назад
I think all of this is not really that important actually it's complicating the code and making it unreadable
@BristlyBright
@BristlyBright 3 года назад
Varför uttalar du som svensk ditt namn på det sättet? Ekberg. Eckbörg? Ett namn är ett namn och uttalas bara på ett sätt. Nu skall jag kolla resten av videon, som jag faktiskt tror är av bra kvalitet, ämnet är av stort intresse.
@FilipEkberg
@FilipEkberg 3 года назад
Alltid gjort och kommer alltid göra. Jag anser att ett namn kan uttalas hur som helst, spelar ingen roll.
@BristlyBright
@BristlyBright 3 года назад
@@FilipEkberg Tack för svar. Jag tycker det känns konstigt bara. Men respekt för bra kontent skall du ha i alla fall!! 👍
@FilipEkberg
@FilipEkberg 3 года назад
@@BristlyBright Tack så mycket! Kul att du gillar de :)
Далее
C# 9.0: Record types
9:24
Просмотров 26 тыс.
5 New Features in C# 9 (not including Records)
1:11:00
Просмотров 80 тыс.
C# 9 Language Features
22:39
Просмотров 62 тыс.
Ruby: #fetch for defaults
3:08
Просмотров 96