Iif equivalent in C#

C# has the ? ternary operator, like other C-style languages. However, this is not perfectly equivalent to IIf(); there are two important differences. To explain the first difference, the false-part argument for this IIf() call causes a DivideByZeroException, even though the boolean argument is True. IIf() is just a function, and like all functions all … Read more