6
我想從DataTable中獲取所有列值並將其存儲到ListBox中。這裏是我的代碼從DataTable中獲取值
If myTableData.Rows.Count > 0 Then
For i As Integer = 0 To myTableData.Rows.Count
Dim DataType() As String = myTableData.Rows(i).Item(1)
ListBox2.Items.AddRange(DataType)
Next
End If
但是當我編譯的代碼,我得到了這樣的錯誤消息:
Unable to cast object of type 'System.String' to type 'System.String[]'
那麼,如何解決這個問題?請幫我....
yapp,我想念那部分:D 感謝您的幫助 – Flashidkz 2012-01-05 17:56:47