tags:

views:

188

answers:

2

Hey everyone. My friend and I are re-learning Visual Basic, and we are stumped on this bit of code.

For intAsterisks As Integer = 0 To intLine - 1
  lblAsterisks.Text = lblAsterisks.Text + "*"
Next

We need to be able to make that from a For Next code into a Do Loop code. Could anyone assist us?

+2  A: 
dim intAsterisks as integer = 0
Do While intAsterisks < intLine
    'Do stuff
    intAsterisks = intAsterisks + 1
Loop
Stewbob
+2  A: 

I would ask the question "Why do you need to convert it?"

Dim i as Integer = 0
Do While i < intLine
    lblAsterisks.Text = lblAsterisks.Text + "*"
    i = i + 1
Loop
Mitch Wheat