Subin Varghese

Subin Varghese

  • NA
  • 5
  • 1.3k

How to get Values from Incremented Variables

Sep 17 2013 12:52 AM
Hi

I have created a programme in VB.NET in which I use string variables like
 Move1, Move2, Move3.... Move8

Now I ned to access the values stored in these variables through a loop. So I used FOR Loop

Like this:-
For I = 1 To 8
            If Len("Move" & I) > 0 Then
                Console.WriteLine("Move" & I)
            End If
Next

But I am not able to get the value from Move1 ..till.. Move8. What can be the reason and a possible solution for this. I hope you got my question.

Thanks

Answers (6)