Mega Code Archive

 
Categories / VB.Net Tutorial / Statements
 

Using the While structure to demonstrate counter-controlled repetition

Module Tester     Sub Main()         Dim counter As Integer = 2       While counter <= 10           Console.Write(counter & " ")          counter += 2        End While     End Sub  End Module 2 4 6 8 10