In this video we are exploring pattern matching in C#. This is a great addition to the C# language and is something I've personally been using in other programming languages!
With C# 9.0 pattern matching has been improved to add more patterns. We now have the following additional patterns:
1. Type patterns
2. Conjunctive and patterns
3. Disjunctive or patterns
4. Negated not patterns
5. Parenthesized patterns
6. Relational patterns
Learn more about the news in C# 9.0 at the Microsoft Docs: https://docs.microsoft.com/en-us/dotn...
Follow me on Twitter: @fekberg / fekberg
Check out my courses on Pluralsight: https://pluralsight.pxf.io/d1MRK
Office background by: https://unsplash.com/@sunday_digital
Table of contents:
00:00 What is pattern matching?
01:24 Pattern matching in C#
01:53 Pattern matching in C# 8.0
02:35 Switch expression in C# 8.0
04:11 Positional pattern
04:47 Property pattern
05:05 Tuple pattern
05:20 Pattern matching in C# 9.0
06:40 Type pattern
08:20 Relational pattern
09:40 Conjunctive "and" pattern
11:21 Disjunctive "or" pattern
13:12 Parenthesized pattern
13:40 Negated "not" pattern
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the links, I may receive a small commission.
Смотрите видео Pattern Matching in C# онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Filip Ekberg 01 Октябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 17,684 раз и оно понравилось 613 людям.