Have you tried out the switch expression in CSharp yet?
Very similar to the switch statement that we've had available to us, the switch expression operates on an input variable.
The big differences I like:
No need for break and return keywords
More succinct syntax without writing "case"
The result is assigned into a variable instead
And the discard syntax is pretty nifty too. Try it out!
Check out the full video:
• CSharp Switch Statements - How To Con...
----
📨 Sign up for my FREE email newsletter:
https://subscribe.devleader.ca
🗣️ Share with your network!
#csharp #dotnet #dotnetcore #csharpdevelopers
Watch video Have you tried out the switch expression in CSharp yet? online without registration, duration hours minute second in high quality. This video was added by user Dev Leader 31 August 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 46 once and liked it 1 people.