简单的初学者问题在这里,放轻松。我有几个文本框,用户可以将值放入 + 选择日期,我希望它们出现在列表框中。不幸的是,只有第二个文本框的值出现多次。这可以在这里看到:http: //i.stack.imgur.com/kCqrz.png
这是完整的表格代码: http: //pastebin.com/MDb1hSCA
这是将数据添加到数组的位置:
stockArray(nofDataDay, lowValue) = possibleLow
stockArray(nofDataDay, highValue) = possibleHigh
stockArray(nofDataDay, openValue) = possibleOpen
stockArray(nofDataDay, closeValue) = possibleClose
dateArray(nofDataDay) = Convert.ToDateTime(WeatherDateTimePicker.Text)
nofDataDay = nofDataDay + 1
这是它的显示位置:
For day = 0 To nofDataDay - 1
StockListBox.Items.Add(dateArray(day).ToShortDateString & _
delimiter & stockArray(day, openValue).ToString & _
delimiter & stockArray(day, closeValue).ToString & _
delimiter & stockArray(day, highValue).ToString & _
delimiter & stockArray(day, lowValue).ToString & _
delimiter & AverageStock(stockArray(day, lowValue), stockArray(day, highValue)))
Next
出于某种原因,它只是添加了 Close 值。