为什么我这个代码不能换行(VB.NET)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickConst n = 20
Dim a(n), i, j, t As Integer
Dim tmpstr As String
Randomize()
tmpstr = "显示排序前A的元素:" & Chr(13) & Chr(10)
For i = 0 To n - 1
a(i) = Int(Rnd() * 90) + 10
tmpstr = tmpstr & a(i) & " "
Next i
TextBox1.Text = tmpstr
For j = 0 To n - 2
For i = 0 To n - 2 - j
If a(i) < a(i + 1) Then
t = a(i)
a(i) = a(i + 1)
a(i + 1) = t
End If
Next i
Next j
tmpstr = "显示排序后A的元素:" & Chr(13) & Chr(10)
For i = 0 To n - 1
tmpstr = tmpstr & a(i) & " "
Next i
TextBox2.Text = tmpstr
For i = 0 To n - 1
Debug.Write(a(20))
Debug.Write(Space(4))
If i Mod 5 = 0 And i <> 0 Then Debug.WriteLine(" ")
Next i
End Sub
我想把这个代码改成4行5列的
但是 For i = 0 To n - 1
Debug.Write(a(20))
Debug.Write(Space(4))
If i Mod 5 = 0 And i <> 0 Then Debug.WriteLine(" ")
Next i
这里好象出错了 帮个忙谢谢