Загрузка...

C# Switch Expressions - Detailed hands-on | New Features | Smart Programming

Remove all your nested and complex if-else if - else logic with switch expressions. With concise statement, better readability, its one of the major change brought in core programming concepts since school days. in addition to improve better chances at interview with more readable and better understandable code, this also improves overall efficiency and productivity.

This video covers briefly the new c# switch expressions introduced in C# 9.0 along with all the changes around the switch that happened from C# 7.3, C# 8.0, C# 9.0. when keyword and conditional attributes were allowed in C# earlier but with C# 9.0 its a totally different game. In this detailed hands-on lab we shall be visiting all the new language features and cover them in detail.

Cover this with the power of .net core, this can boost the productivity to next level with all the smart programming and clean code with better readability.

Link to code: https://github.com/letsdocoding/dotnet-programming-general/tree/main/2.NewWayToUseSwitch

Other smart programming tips and basics : https://www.youtube.com/watch?v=LCv7PDXoxqw&list=PL3TuugVsz1mOTM86OLvCN_sJ1x_M6Q2TH
System Design: https://www.youtube.com/watch?v=kTyddfi5-6M&list=PL3TuugVsz1mPJf8wdXJDdxKlgUogzW7er
AWS Collection - https://www.youtube.com/playlist?list=PL3TuugVsz1mMkmYh8lO_0rl1hBf66ow1L
index
0:00 - Intro
1:23 - Simple if-else statement
3:09 - Convert if-elseif to switch
4:50 - conditional case statement
06:10 - Simplifying conditional case statement
7:24 - Switch Expressions
9:44 - Discard operator as default
11:04 - Property Access
16:02 - Object Type check
19:10 - Tuple / object checks
23:06 - Thanks

Видео C# Switch Expressions - Detailed hands-on | New Features | Smart Programming канала Lets Do Coding
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять