Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debug.Print() in a single line

Status
Not open for further replies.

greathope123

Programmer
Nov 1, 2011
84
GB
Hi,

In VB6, we can do
for i = 1 to 10
for j = 1 to 10
Debug.Print a(i,j),
next j
Debug.Print
next i
The result will be 10 lines with 10 elements in each line.

Can you tell me how to do this in VB.Net?
 
What is a? Where and how did you declare 'a'?

Have fun.

---- Andy
 
A guess here: if a is an array, how about:

Code:
Dim a(0 To 10, 0 To 10) As Integer
Dim str As String = ""

For i As Integer = 1 To 10
    For j As Integer = 1 To 10
        str += a(i, j) & " "
    Next j
    Debug.Print(str)
    str = ""
Next i

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top