vbNullString [英] vbNullString

查看:64
本文介绍了vbNullString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是.NET等价物


Dim strTmp as string

如果strTmp = vbNullString


早些时候在错误的新闻组中发布了这个。

What''s the .NET equivalent

Dim strTmp as string
If strTmp=vbNullString

Posted this earlier in the wrong Newsgroup.

推荐答案

Lou写道:
Lou wrote:

什么这是.NET的等价物吗?
What''s the .NET equivalent?


Dim strTmp as string

如果strTmp = vbNullString
Dim strTmp as string
If strTmp = vbNullString



如上所述,我不确定你能做这个比较。

字符串是否可以包含database-y空值? (相对于正确的

没有?)


无论如何,一个物体可以,所以


昏暗o as Object _

= PotentiallyNullValueFromDB()


如果o是System.DBNull.Value那么

。 。 。


HTH,

Phill W.

As given, I''m not sure you can do this comparison.
Can a String hold a "database-y" null value? (As opposed to a proper
Nothing?)

Well anyway, an Object can, so

Dim o as Object _
= PotentiallyNullValueFromDB()

If o Is System.DBNull.Value Then
. . .

HTH,
Phill W.


Lou写道:
Lou wrote:

什么是.NET等价物


Dim strTmp as string

如果strTmp = vbNullString


之前在错误的新闻组中发布此内容。

What''s the .NET equivalent

Dim strTmp as string
If strTmp=vbNullString

Posted this earlier in the wrong Newsgroup.



String.Empty


-

G?ran Andersson

_____
http://www.guffa.com


Phill W.写道:
Phill W. wrote:

Lou写道:
Lou wrote:

>什么是.NET等价物?
>What''s the .NET equivalent?


> Dim strTmp as string
如果strTmp = vbNullString
>Dim strTmp as string
If strTmp = vbNullString



如上所述,我不确定你能做这个比较。

字符串是否可以包含database-y。空值? (相对于正确的

没有?)


无论如何,一个物体可以,所以


昏暗o as Object _

= PotentiallyNullValueFromDB()


如果o是System.DBNull.Value那么

。 。 。


HTH,

Phill W.


As given, I''m not sure you can do this comparison.
Can a String hold a "database-y" null value? (As opposed to a proper
Nothing?)

Well anyway, an Object can, so

Dim o as Object _
= PotentiallyNullValueFromDB()

If o Is System.DBNull.Value Then
. . .

HTH,
Phill W.



vbNullString不代表数据库null,它只是一个空字符串。


-

G?跑Andersson

_____
http://www.guffa.com

这篇关于vbNullString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆