Vb.net 如何使用<&燃气轮机;ScheduledAction类中的操作员(Visual Studio、Windows Phone 7.1)
嗨,我需要对使用ScheduledAction类的编码使用“”(不等于)运算符,但我一直收到以下错误:Vb.net 如何使用<&燃气轮机;ScheduledAction类中的操作员(Visual Studio、Windows Phone 7.1),vb.net,visual-studio,windows-phone-7,Vb.net,Visual Studio,Windows Phone 7,嗨,我需要对使用ScheduledAction类的编码使用“”(不等于)运算符,但我一直收到以下错误: Error 1 Operator '<>' is not defined for types 'Microsoft.Phone.Scheduler.ScheduledAction' and 'Microsoft.Phone.Scheduler.ScheduledAction' 未为类型“Microsoft.Phone.Scheduler.ScheduledAction”和
Error 1 Operator '<>' is not defined for types 'Microsoft.Phone.Scheduler.ScheduledAction' and 'Microsoft.Phone.Scheduler.ScheduledAction'
未为类型“Microsoft.Phone.Scheduler.ScheduledAction”和“Microsoft.Phone.ScheduledAction”定义错误1运算符“”
下面是我的代码,它导致了错误:
Dim hw As ScheduledAction = ScheduledActionService.Find("Hello World")
If hw <> Nothing Then
...
Dim hw As ScheduledAction=ScheduledActionService.Find(“Hello World”)
如果没有,那么
...
ScheduledAction类型未实现相等运算符,因此需要通过Is
和IsNot
执行显式引用相等
if hw IsNot Nothing Then
...