Have you tried out the switch expression in CSharp yet?

Опубликовано: 31 Август 2024
на канале: Dev Leader
460
12

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


Смотрите видео Have you tried out the switch expression in CSharp yet? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dev Leader 31 Август 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 460 раз и оно понравилось 12 людям.