c# – 强制循环迭代
发布时间:2020-12-15 20:04:32 所属栏目:百科 来源:网络整理
导读:在我的“原生”编程语言(RPG)中,我可以编写一个循环,然后离开循环或强制迭代.它有点像GOTO. dow (x 999); read file; if (%eof); leave; // Leave the loop endif; if (field fileField); iter; // Iterate to the next record endif;enddo; 我的问题是,是否
在我的“原生”编程语言(RPG)中,我可以编写一个循环,然后离开循环或强制迭代.它有点像GOTO.
dow (x < 999); read file; if (%eof); leave; // Leave the loop endif; if (field <> fileField); iter; // Iterate to the next record endif; enddo; 我的问题是,是否有类似的选项是C#.就我而言,我正在使用foreach循环. 解决方法continue; // Goto the next iteration break; // Exit the loop (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |