2012-03-15 13 views
1

您好我需要使用「<>」(不等於)運算符來使用SheduledAction類的編碼,但我保留收到此錯誤:如何在ScheduledAction類中使用<>運算符(Visual Studio,Windows Phone 7.1)

Error 1 Operator '<>' is not defined for types 'Microsoft.Phone.Scheduler.ScheduledAction' and 'Microsoft.Phone.Scheduler.ScheduledAction' 

這裏是我的編碼這就是造就了錯誤:

Dim hw As ScheduledAction = ScheduledActionService.Find("Hello World") 

     If hw <> Nothing Then 
... 

回答

2

,所以你需要通過IsIsNot做明確提到平等ScheduledAction型沒有實現平等的運營商

if hw IsNot Nothing Then 
    ... 
相關問題