Quantcast
Channel: Nullable and IIf
Viewing all articles
Browse latest Browse all 9

Nullable and IIf

$
0
0
Ah thanks a lot. Did not know about ternary If.

Question: In the documentation for the IIF function, there is a warning that the returned object needs to be cast if Option Strict is on. Is that the case for IF operator also?

For googlers, I should mention that the correct way to do my original construction would be to use waa.GetValueorDefault() which always succeeds. That a default value may be returned is of no consequence because it won't be used since HasValue would be false.

Viewing all articles
Browse latest Browse all 9

Trending Articles