Looping (While) Program On VB.net


Example Looping WHILE on VB.net

Step to made  Looping WHILE Program :
1. Add label, 1 textbox and 1 button


2. Double click on button and add the coding :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim x As Integer
        x = 1
        While x <= 5
            TextBox1.Text = TextBox1.Text & x
            x = x + 1
        End While
End Sub

3. Done compile this program







Comments