VB.Net
allows using one loop inside another loop. The following section shows few examples to illustrate the concept.
Syntax
The syntax for a nested For loop statement in VB.Net
is as follows −
For counter1 [ As datatype1 ] = start1 To end1 [
Step step1 ]
For counter2 [ As datatype2 ] = start2 To end2 [
Step step2 ]
...
Next [ counter2 ]
Next [ counter 1]