vb.net null 如何判断字符串为空

vb.net null 如何判断字符串为空
最新回答
关于鹿的诗

2021-12-03 17:48:20

不宴烂知道你说的空是哪种意思?

有两种说法,一种是String.Empty,例如
Dim s As String = String.Empty 等雀茄同于 Dim s As String = ""
这种情晌岁漏况下直接If s = "" Then就可以判断是不是空.

还有一种是Nothing,必须要用If IsNothing(s) Then来判断.
他年词笔隐

2022-06-20 19:22:18

Dim myString as String
if myString="" then
空返肢
else
非漏并世蔽空空
end if
何必讨好

2022-01-02 22:32:39

dim a as STRING
if a is VBSTRINGNULL then
```
落花缤纷下

2020-11-21 13:04:22

null在vb.net中为nothing