vb2008陣列問題

2008-05-04 3:06 am
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim S() As Integer = {100, 80, 89, 78, 98}

For Each a As Integer In S
Console.WriteLine(a)

Next a
End Sub
End Class

-----------------------------------------------------------------------------------------
我想問上面這段程式碼有什麼問題?我偵錯時它沒說有錯誤,但就是執行不出結果,到底問題在哪裡?

回答 (3)

2008-05-07 1:52 pm
✔ 最佳答案
把Console.WriteLine(a)改成TextBox1.Text = TextBox1.Text & a & vbNewLine就可以了.
參考: 自己
2008-05-07 1:10 am
就是什麼都沒有,只出現一個有按鈕的表單而已.
2008-05-06 8:23 am
執行時出了甚麼結果﹖


收錄日期: 2021-04-24 10:54:35
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080503000051KK02418

檢視 Wayback Machine 備份