Ann Smith
04-01-2005, 05:13 PM
Hi Folks:
I'm a beginner to VB.Net and wondering if anyone could help me with the following:
I try to place the following For Next loop to a button(click event) and output to a list box:
for i = 1 to 2 step 1
lstbox.items.add(i)
for j = 2 to 6 step 2
lstbox.items.add(i * j)
next j
next i
The output from the above codes would look like this:
1
2
4
6
2
4
8
12
How can I make the output look like this:
1 2 4 6
2 4 8 12
When I used the write method in console application it just worked fine. I would appreciate it if anyone can give me a hint. Thanks.
I'm a beginner to VB.Net and wondering if anyone could help me with the following:
I try to place the following For Next loop to a button(click event) and output to a list box:
for i = 1 to 2 step 1
lstbox.items.add(i)
for j = 2 to 6 step 2
lstbox.items.add(i * j)
next j
next i
The output from the above codes would look like this:
1
2
4
6
2
4
8
12
How can I make the output look like this:
1 2 4 6
2 4 8 12
When I used the write method in console application it just worked fine. I would appreciate it if anyone can give me a hint. Thanks.