Quantcast
Channel: Using VB.NET IIF I get NullReferenceException - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Philip Fourie for Using VB.NET IIF I get NullReferenceException

$
0
0

This is the expected behaviour.

IIF is a function; therefore the parameters for the function will be evaluated before sending it to the function.

In contrast, the ternary operator in C# is a language construct that prevents the evaluation of the second parameter if the expression of the ternary is true.


Viewing all articles
Browse latest Browse all 4

Trending Articles



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