Use IF().
It is a short-circuiting ternary operator.
Dim Result = IF(expression,<true return>,<false return>)
SEE ALSO:
-
IIF becomes If, and a true ternary operator
-
Is there a conditional ternary
operator in VB.NET? -
Orcas introduces the IF operator – a
new and improved IIF -
The Ternary Operator in VB.NET