**News Alert:**Experts Exchange Confirmed as Safe in Cloudbleed Leak Read More

Solved

Posted on 2012-04-13

For i As Integer = 0 To 10 - 1

Console.WriteLine("i : " & i)

For j As Integer = 3 To 10

Console.WriteLine("j : " & j)

Exit For

Next

Next

the following produce

i : 0

j : 3

i : 1

j : 3

i : 2

j : 3

i : 3

j : 3

i : 4

j : 3

i : 5

j : 3

i : 6

j : 3

i : 7

j : 3

i : 8

j : 3

i : 9

j : 3

how to produce

i : 0

j : 3

i : 1

j : 4

i : 2

j : 5

i : 3

j : 6

i : 4

j : 7

i : 5

j : 8

i : 6

j : 9

i : 7

j : 10

i : 8

j : 3

i : 9

j : 4

i : 10

j : 5

i : 11

j : 6

i : 12

j : 7

i : 13

j : 8

i : 14

j : 9

i : 15

j : 10

i : 16

j : 3

i : 17

j : 4

...etc

Console.WriteLine("i : " & i)

For j As Integer = 3 To 10

Console.WriteLine("j : " & j)

Exit For

Next

Next

the following produce

i : 0

j : 3

i : 1

j : 3

i : 2

j : 3

i : 3

j : 3

i : 4

j : 3

i : 5

j : 3

i : 6

j : 3

i : 7

j : 3

i : 8

j : 3

i : 9

j : 3

how to produce

i : 0

j : 3

i : 1

j : 4

i : 2

j : 5

i : 3

j : 6

i : 4

j : 7

i : 5

j : 8

i : 6

j : 9

i : 7

j : 10

i : 8

j : 3

i : 9

j : 4

i : 10

j : 5

i : 11

j : 6

i : 12

j : 7

i : 13

j : 8

i : 14

j : 9

i : 15

j : 10

i : 16

j : 3

i : 17

j : 4

...etc

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Title | # Comments | Views | Activity |
---|---|---|---|

VB.Net - MemoryMappedFiles - Confirm receipt | 2 | 19 | |

Get distinct values from excel or comm seperated file | 4 | 26 | |

Each Group By expression must contain at least one column that is not an outer reference | 5 | 21 | |

SQL Server Import/Error Wizard error | 12 | 19 |

The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

Join the community of 500,000 technology professionals and ask your questions.