【发布时间】:2010-09-30 13:08:19
【问题描述】:
我正在做一些调试,所以我想记录 eventArgs 值
我有一条简单的线,基本上可以:
logLine = "e.Value: " + IIf(e.Value Is Nothing, "", e.Value.ToString())
我理解 IIF 函数的方式,如果 e.Value 是 Nothing (null) 那么它应该返回空字符串,如果不是它应该返回值的 .ToString。但是,我得到了 NullReferenceException。这对我来说没有意义。
有什么想法吗?
【问题讨论】:
标签: .net vb.net nullreferenceexception