Тёмный

Coding Shorts: Don't Be Afraid of Pattern Matching in C# 

Shawn Wildermuth
Подписаться 17 тыс.
Просмотров 3,5 тыс.
50% 1

Наука

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

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 28   
@rogerpence
@rogerpence Год назад
This is very helpful, Shawn. Your concise format is great. And I can't tell you how much I appreciate you saying, "let's get started..." and then not making me watch a 90 splash screen. Thank you!
@swildermuth
@swildermuth Год назад
I appreciate that!
@shenmajid
@shenmajid Год назад
Best explanation ever..
@swildermuth
@swildermuth Год назад
Glad it was helpful!
@vssang4035
@vssang4035 5 месяцев назад
Great video Shawn... Im a big fan of your teaching style. Easy to follow and understand. Thanks
@seriyezh
@seriyezh Год назад
Thank you Shawn. Pattern matching is a really powerful tool. The only problem for me personally is that now I use it by default whenever I can, but I need to remember which features are supported by each C# version 😁.
@godfathermikal
@godfathermikal Год назад
I glossed over pattern matching as I didn't really see a need for it. Thought it was more gimmicky than useful. Now, I must retract my original opinion. I really am glad that you take the time to make these coding shorts. The usefulness I have found in them is almost better than a Pluralsight/Udemy subscription. These are actually applicable to the work I do every day. Thank you!
@swildermuth
@swildermuth Год назад
Glad it was helpful!
@Adminian357
@Adminian357 Год назад
Loving these Shawn!
@swildermuth
@swildermuth Год назад
Thanks, fun doing them.
@arjanvandenberg5313
@arjanvandenberg5313 Год назад
Fully agree with the concise format. Very good and thanks again!
@antondoit
@antondoit 2 месяца назад
Great
@rumbust7793
@rumbust7793 Год назад
Took me about 15 minutes in to the video to see the Falcon, have my build of that same same model on a shelf behind me in view when doing conference calls. Mind blown by the pattern matching, I'm guessing this is a "Core" feature? My current project dreams of going to Core but there's currently no real reason to move but we have considered doing some reasonably free standing part in Core just to get started.
@a-s733
@a-s733 Год назад
Very clear. Thanks Shawn
@swildermuth
@swildermuth Год назад
You got it!
@AbouLojyn
@AbouLojyn Год назад
Awesome
@mazingguitar
@mazingguitar Год назад
I've managed to miss pattern matching feature somehow but it's ultra powerful. It gives you so much power of method logic customization (e.g. where your logic should be different for enumerable regarding their sizes). Great explanation - hope I'll make use of this sooner than later :)
@swildermuth
@swildermuth Год назад
Awesome!
@DominicCronin
@DominicCronin Месяц назад
I've just subscribed on the basis of this video. I'm still trying to figure out when the pattern-matching switch counts as an improvement to the code. I'm clear that the answer is "Not always". Conciseness isn't always a virtue, especially if you end up with write-only code that the reader has to unpick.
@swildermuth
@swildermuth Месяц назад
This difference here is being able to make more concise code that is easier to read and uses fewer allocations. But it's not a big enough difference to try and refactor all your existing code, but it's a nice arrow in the quiver.
@DominicCronin
@DominicCronin Месяц назад
@@swildermuth Oh - I agree, it's a nice arrow in the quiver, but I've already seen enough examples of people using switch expressions to write unbelievably dense code, and often to put far more logic in a function than makes sense. Conciseness can be beneficial, but use with care!!
@mattbristo6933
@mattbristo6933 Год назад
Brilliant video
@swildermuth
@swildermuth Год назад
Thanks!
@clearz3600
@clearz3600 Год назад
Hi, Wouldn't using 'when msg is string' be redundant since it will already be matched as a string using 'string s'
@swildermuth
@swildermuth Год назад
Yes, not my best example.
@RiversJ
@RiversJ 10 месяцев назад
Afraid? I get annoyed when i can't use it as fully as i want to!
@swildermuth
@swildermuth 10 месяцев назад
Exactly
Далее
Coding Shorts: Stop Leaking Secrets in ASP.NET Core
14:19
Coding Shorts: C# Dialects and Idioms
19:13
Просмотров 3,2 тыс.
Əliyev və Putin kilsədə şam yandırıblar
00:29
Просмотров 198 тыс.
Coding Shorts: Ahead-of-Time Compilation in C# (AOT)
12:03
Coding Shorts: Methods, Funcs & Actions...Oh, My!
11:02
Coding Shorts #102: Using SQL Server Containers for Dev
11:00
Coding Shorts: Running Async Jobs in ASP.NET Core
9:52
Coding Shorts: Making Sense of Stack vs. Heap
5:33
Просмотров 1,8 тыс.
Coding Shorts #103: Using Code Cleanup in Visual Studio
12:30
Обзор Pixel 9 Pro XL. Новый облик.
11:42
ноутбуки от 7.900 в тг laptopshoptop
0:14
Мой новый мега монитор!🤯
1:00
Китайский i9-12900HX за 15000 рублей
0:58
12 000 рублей за это? Xiaomi Fold 3
0:58
Просмотров 191 тыс.