我试图从我的webservice service1调用函数getTemp(value as integer)。当我执行代码时,它会给出一个错误,指出_value
没什么。
如果我在正常的windowsforms项目中调用相同的函数,它将完美运行。
有没有人有解决方案?
请参阅下面的代码(省略import语句):
Dim _value As String
Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
Dim client As New Service1Client
AddHandler client.GetTempCompleted, AddressOf getTempgotten
client.GetTempAsync(3)
MessageBox.Show(CStr(_value))
End Sub
Public Sub getTempgotten(sender As Object, e As GetTempCompletedEventArgs)
_value = CStr(e.Result)
End Sub
PS:我是这个论坛的新手,请原谅我的错误。