Klaus Mock: VB.Net Do While Schleife wiederholen (continue)

Beitrag lesen

Hallo,

war, vielleicht etwas blöd ausgedrückt, aber genau das meine ich. in c++, c# und in java geht das mit continue. ist vb echt so blöd dass es da nicht geht?

VB.NET schon, lt. meiner MSDN-Dokumentation kannst Du das continue nur mit einem GOTO emulieren:

Hier das Beispiel aus der Doku:

Dim LoopCounter As Integer = 0
   Do While LoopCounter < 100
      LoopCounter += 1
      Dim SkipToNextIteration As Boolean   ' Local to this loop.
      ' Processing, which might change value of SkipToNextIteration.
      If SkipToNextIteration = True Then GoTo EndOfLoop
      ' More processing if SkipToNextIteration was still False.
EndOfLoop: Loop ' Acts like Continue.

Grüße
  Klaus