русский
Germany.ruForen → Архив Досок→ Programmierung

Задачка

04.04.25 18:52
Re: Задачка
 
AlexNek патриот
AlexNek
in Antwort alex445 04.04.25 17:04

Это не задачка, а очередное извращение, но ИИ скормить можно


foreach (var item in items)
{
    if (SomeProcessing(item))
        break;
}

The else continue; is redundant because the loop naturally continues unless a break is encountered. Also, there's no need for the doBreak variable.

 

Sprung zu