none
Do while Loop

    Question

  • I copied this loop code from the MSDN VB video, but for some reason its not working for me.

    Dim

    i As Integer

    i = 0

    Do While i < Integer.Parse(TextBox1.Text)

    i += 1

    ' i = i+1

    Loop

    MessageBox.Show("The final value was:" & i.ToString())

    Please advise.

    thanks/regards

    Thursday, May 21, 2009 5:19 PM

Answers

  • This is a Visual Basic question. You have arrived at the Small Basic forum. The two languages are very different and are aimed at a different target audience. I suggest you repost at the Visual Basic forum.

    I'm not sure i += 1 is an allowable VB construct. This shortform is used in the C family of languages. You may need to comment out that line and uncomment the following one.
    • Marked as answer by Fasieh Friday, May 22, 2009 3:12 PM
    Thursday, May 21, 2009 5:47 PM