早上好所以,
我有一个问题,我知道这可能是编程 101,但我在声明一个变量然后捕获它的值以显示在标签中以供在应用程序中进一步使用时遇到问题。我创建了一个数字上/下来限制用户的条目数。现在我只需要声明变量并能够在 label16 上显示它......我无法让它工作,我认为这是我的语法,但我不太确定。无论如何,这是我的代码。我将衷心感谢您的帮助。
`'This textbox requests input from user in the form of numbers representing Hours of Operation Used'
Private Sub HoursOfOperation_ValueChanged(sender As Object, e As EventArgs) Handles HoursOfOperation.ValueChanged, HoursOfOperation.Click
Dim hoursSelected As Object = Nothing
Dim InthoursSelected = hoursSelected
label16.Text = hoursSelected.ToString
End Sub`