VB.NET & For Next - For Next : Repeats a group of statements a specified number of times.
ShotDev Focus:
- VB.NET & For Next
Syntax
For counter [ As datatype ] = start To end [ Step step ] [ statements ] [ Exit For ] [ statements ] Next [ counter ]
Example
AspNetForNext.aspx
<%@ Page Language="VB" %> <%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim i As Integer For i = 0 To 5 Response.write(i &" ShotDev.Com <br>") Next Response.write("<hr>") For i = 0 To 10 Step 3 Response.write(i &" ShotDev.Com <br>") Next Response.write("<hr>") For i = 10 To 0 Step -2 Response.write(i &" ShotDev.Com <br>") Next Response.write("<hr>") End Sub </script>
Screenshot