问题描述
我正在尝试检查空值的呈现或空值不存在
。我的示例代码如下:
如果EmailAddresses什么都没有那么
SendMailMessage(EmailAddresses,AlertTitle,
ViolationBody)
结束如果
以上代码在检查空礼物时是否有效
值/ Nothing /""。
但是,我想检查null是否存在,即
如果EmailAddresses不是什么,那么
SendMailMessage(EmailAddresses,AlertTitle,
ViolationBody)
结束如果
以上代码无法编译。
基本上我想知道什么时候出现空值而不存在。
谢谢
I''m trying to check for the presents of null values or null value not being
present. My sample code below:
If EmailAddresses Is Nothing Then
SendMailMessage(EmailAddresses, AlertTitle,
ViolationBody)
End If
The above code works when checking for the presents of a null
value/Nothing/"".
However, I want to check for null not being present ie.
If EmailAddresses not Nothing Then
SendMailMessage(EmailAddresses, AlertTitle,
ViolationBody)
End If
The above code will not compile.
Basically I want to know when nulls are present and not present.
Thanks
推荐答案
Imran。
Imran.
将上述内容改为:
如果不是电子邮件地址则没有那么
Change the above to:
If Not EmailAddresses Is Nothing Then
Imran。
Imran.
将上述内容改为:
如果不是电子邮件地址则没有那么
Change the above to:
If Not EmailAddresses Is Nothing Then
Imran。
Imran.
这篇关于存在的Null值/ Nothing /“"”或不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!