Pages

Friday, 5 July 2013

VB 11 Tutorial 6: Getting Started

VB 11 Tutorial 6: Getting Started

If you have not yet learnt about Functions Please refer to Tutorial 5: Here

Today we will be learning how to use loops and for statements



Code:

' Example of loops

Module SubNew

Sub Main()
Dim X As Long = 10
Dim I As Long = 0

For I = 0 To X
Console.WriteLine(I)
Next

I = 0

Do
Console.WriteLine(I)
I +=1
Loop I <= X

I = 0

While I <= X
Console.WriteLine(I)
I +=1
End While

End Sub

End Module

No comments:

Post a Comment