相关疑难解决方法(0)

在嵌套的while循环中继续

在这个代码示例中,有没有办法从catch块继续外部循环?

while
{
   // outer loop

   while
   {
       // inner loop
       try
       {
           throw;
       }
       catch 
       {
           // how do I continue on the outer loop from here?
           continue;
       }
   }
}
Run Code Online (Sandbox Code Playgroud)

c# loops continue while-loop

55
推荐指数
5
解决办法
5万
查看次数

标签 统计

c# ×1

continue ×1

loops ×1

while-loop ×1