A
A
Aslan2018-11-13 19:26:43
Programming languages
Aslan, 2018-11-13 19:26:43

Is it possible in a switch to jump back to the beginning of a switch in C#?

Is there such a function in C# to jump from the middle of a switch to its beginning? Like continue, but not skipping, but starting over? Or will you have to resort to crutches, if before, then which ones can you tell me?
,

switch (selected)
            {
                case '1':

                    break;
                default:
                    Console.WriteLine("Ошибка! Тут такого нет, прости. Выбери что-нибудь другое:");
                    *тут он должен вернуться к началу switch*
                    break;
            }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey V, 2018-11-13
@CapsLockk

there is an operator for thatgoto

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question