IIF becomes If, and a true ternary operator
Posted by: Panopticon Central,
on 08 May 2007 |
View original | Bookmarked: 0 time(s)
Many months ago, I discussed the fact that we were finally planning to come up with a true ternary conditional operator that would allow short-circuited conditional expressions. (Just as a quick recap: the current problem with the IIF function is that it evaluates all the arguments since it is just a regular method call. So "IIF(x Is Nothing, "Empty", x.Name)" will throw an exception if x is Nothing, because we still evaluate x.Name.) At the time, we were considering taking the IIF function and making...