What happens when we remove a break from a switch statement in CSharp?

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

What happens when we remove a break from a switch statement in CSharp?

The whole program implodes. That's it. The end.

Well, only if you did this by accident and ran into an exception! But this does have very valid use cases as well!

We can remove a break or a return keyword from a case in a switch statement, and it will allow the logic to flow forward.

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


Смотрите видео What happens when we remove a break from a switch statement in CSharp? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dev Leader 30 Август 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 12 раз и оно понравилось 1 людям.