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

Nullable and IIf

$
0
0

Yes you would need to cast to the desired type using the If operator, same as IIF function. This is because the true and false parts it could possibly return, are of type object, since it doesn't know what type the return value would be (and because types could vary based on the true/false evaluation).

So yes, cast your objects to whatever type you need them as.


Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com - visit my website for a chance to win an MSDN subscription.

Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>