while (foo() == true)
{
foreach (var x in xs)
{
if (bar(x) == true)
{
//"break;" out of this foreach
//AND "continue;" on the while loop.
}
}
//If I didn't continue, do other stuff.
}
我有点坚持如何做到这一点。
更新:我解决了这个问题。如果我不在continue;
while 循环上调用 a,我忽略了我需要处理其他东西的事实。
抱歉,我没有意识到我用了两次“某事”这个词。