0
嗨下面的代碼給了我一個錯誤,我不太確定如何解決。任何人都可以幫忙嗎?如何解決這個事件相關的錯誤在VB.net(Windows Phone 7)
代碼:
Public Event hw As EventHandler
Private Sub view_hw(sender As Object, eventArgs As Object)
If hw IsNot Nothing Then
hw.Invoke(Me, New EventArgs())
End If
End Sub
錯誤:
Error 1 'Public Event hw(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
如果硬件狀態並沒有沒有那麼 - 該行仍然給我上面提到 – Matt9Atkins 2012-03-16 11:47:52
一個錯誤想那'如果HW IsNot運算沒有Then'在vb.net中不需要,'RaiseEvent'對待那部分! – 2012-03-16 12:05:40