gpt4 book ai didi

vb.net - 是否有相当于 C#'s ' continue' 和 'break' 语句的 VB?

转载 作者:行者123 更新时间:2023-12-02 07:36:43 24 4
gpt4 key购买 nike

出于争论的目的,我怎样才能在 VB 中做到这一点?

foreach foo in bar
{
if (foo == null)
break;

if (foo = "sample")
continue;

// More code
//...
}

最佳答案

--编辑:

自从我回答后,你改变了你的问题,但我会在这里留下我的答案;我怀疑 VB.NET 程序员会向您展示如何实现这样的循环。我不想因为尝试...而伤害我可怜的 C# 编译器的感情。

-- 旧回复:

我相信有

Continue While
Continue For

Exit While
Exit For

关于vb.net - 是否有相当于 C#'s ' continue' 和 'break' 语句的 VB?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1402862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com