"继续] VB中的关键词等效词 [英] "continue" key word equivalent in VB
问题描述
是否存在C ++s的等效关键词continue。在VB(.net)中这个
上下文?
CString szLine;
szLine = myReader.ReadLine();
while(!szLine.IsEmpty())
{
if(szLine(0)=='' - '')
{
szLine = myReader.ReadLine();
继续; //< - HERE,所以如果szLine以 - 开头然后
//这个循环的其余部分没有被执行这个
时间周期......
}
szLine = myReader.ReadLine();
//
//其余的循环代码
/ /
}
谢谢!
Daniel。
is there an equivalent key word for C++''s "continue" in VB (.net) in this
context?
CString szLine;
szLine = myReader.ReadLine();
while ( !szLine.IsEmpty() )
{
if ( szLine(0) == ''-'' )
{
szLine = myReader.ReadLine();
continue; // <-- HERE, so if szLine starts with "-" then
// the rest of this loop is not executed this
time round...
}
szLine = myReader.ReadLine();
//
// rest of the loop code
//
}
thanks!
Daniel.
推荐答案
你好,
" Daniel Bass" <哒******** @ NOSPAMpostmaster.co.uk> schrieb:
Hello,
"Daniel Bass" <da********@NOSPAMpostmaster.co.uk> schrieb:
在这个上下文中,VB(.net)中是否有一个与C ++相同的关键词继续
?
is there an equivalent key word for C++''s "continue"
in VB (.net) in this context?
>
No.
HTH,
Herfried K. Wagner
-
MVP·VB Classic,VB .NET
http://www.mvps.org / dotnet
Herfried,
你确定它的等价物不是像循环退出那样的东西
但是当你这么说时.......................................... .......
Cor
Herfried,
Are you sure is it in that equivalent not something as exit while loop
But when you say so .................................................
Cor
尝试使用break来退出循环
"丹尼尔巴斯 <哒******** @ NOSPAMpostmaster.co.uk>在消息中写道
新闻:uu **************** @ TK2MSFTNGP12.phx.gbl ...
try useing break to drop out of the loop
"Daniel Bass" <da********@NOSPAMpostmaster.co.uk> wrote in message
news:uu****************@TK2MSFTNGP12.phx.gbl...
是否有C ++s的等效关键字继续在这个
上下文中的VB(.net)?
CString szLine;
szLine = myReader.ReadLine();
while(!szLine.IsEmpty())
{
if(szLine(0)=='' - '')
{
szLine = myReader.ReadLine();
继续; //< - HERE,所以如果szLine以 - 开头然后
//这个循环的其余部分没有执行这个
时间周期......
szLine = myReader.ReadLine();
//
//其余的循环代码
//
}
谢谢!
Daniel。
is there an equivalent key word for C++''s "continue" in VB (.net) in this
context?
CString szLine;
szLine = myReader.ReadLine();
while ( !szLine.IsEmpty() )
{
if ( szLine(0) == ''-'' )
{
szLine = myReader.ReadLine();
continue; // <-- HERE, so if szLine starts with "-" then
// the rest of this loop is not executed this
time round...
}
szLine = myReader.ReadLine();
//
// rest of the loop code
//
}
thanks!
Daniel.
这篇关于"继续] VB中的关键词等效词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!