-3
How can I make a loop of a line using VB.NET? In other languages I can do it without any problem as in the examples below:
I have set as an example only for the
for
but in all languages as muchwhile
how muchdo while
would also serve
// Java
for(int i=0; i<10; i++) System.out.print(i + ", ");
// -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
// CSharp
for(int i=0; i<10; i++) Console.Write(i + ", ");
// -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
// Javascript
for(var i=0; i<10; i++) console.log(i + ", ");
// -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
// PHP
for ($i = 0; $i < 10; $i++) echo $i.", ";
// -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
// VB.net
???
// -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
Edit
As @Maniero said, I was forced to take the test in all the languages I listed, and the results are just below them. They’re not as wrong as he says.
All loops go from 0 to 9 and you describe results from 1 to 9.
– marcus