Reading Time: < 1 minute

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.

Sourcecode

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

With an experience of more then 12 yrs in IT, Author is currently working as an Architect in Cloud and Microservices and helps organizations leverage to full potential in the Cloud Revolution. Author has worked across different domains such as Defense, Oil and Gas, Casinos, MedTech etc. In the part time, author loves to play Warcraft & AOE, write blogs and learn new things.

Leave a Reply

Your email address will not be published. Required fields are marked *