Q:

Creating loops on VB.net window forms

I just start learning programming and started with VB.net 5 days ago. I started with window forms on visual studio, I was given an assignment to insert a loop method on my mathematics calculations practice to make the program runs until I exit instead of running once. Thanks in advance and note I'm a beginner, don't use console practice or other, use windows form

A:

Here you finde how to use the while statement in vb.net :
https://msdn.microsoft.com/de-de/library/zh1f56zs.aspx
Dim index As Integer = 0
While index < 100000
index += 1

' If index is between 5 and 7, continue
' with the next iteration.
If index >= 5 And index <= 8 Then
    Continue While
End If

' Display the index.
Debug.Write(index.ToString & " ")

' If index is 10, exit the loop.
If index = 10 Then
    Exit While
End If
End While

Debug.WriteLine("")
' Output: 1 2 3 4 9 10

