user62572 user62572 - 2 months ago 21
Vb.net Question

VB.NET Infinite For Loop

Is it possible to write an infinite for loop in VB.NET?

If so, what is the syntax?

Answer
For i as Integer = 0 To 1 Step 0

If that's not hacky enough, can also write:

For i As Integer = 0 To 2
  i -= 1
Next