for each loop

tommybeer

Member
Joined
May 4, 2005
Messages
15
Programming Experience
Beginner
Hello,

is there a way to skip a row?

like for example

for each g as datarow in dstreservaties.tables(0).rows
if cstr(g("Reservatie_id")) = rid.text then

nextfor (or skip or something like that)

end if
next

greetz
 
C# sharp, like other C based languages has the "continue" keyword that sends execution back to the top of the loop. In VB.NET, the only way I've found is to put everything inside the For loop inside an If block that excludes the rows that you don't want to process. For you, I think that means using something like your example code but using "<>" instead of "=" and then doing all the processing inside the If block.
 
Back
Top