I used IIf as a replacement for the C-style ?: operator: rate = IIf(count = 0, 0, total \ count). With count equal to zero this throws a DivideByZeroException, although the condition should have selected the first value. I have also seen code that uses If(a, b, c) written like a function call.
What is the difference between IIf and If, and which one is the real conditional operator?




