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...

Category: VB.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3425 | Hits: 217

Similar Posts

  • Web.UI ASP.NET Grid: Synchronize Checkbox States with Row Selection more
  • Orcas introduces the IF operator - a new and improved IIF (Sophia Salim) more
  • Preventing dynamic SQL when using dynamic WHERE clause more
  • VB.NET Operators and What Do The Mean? more
  • IIF, a True Ternary Operator and Backwards Compatibility more
  • Quick Type Conversions and Other JavaScript Tricks more
  • Why VB.NET suxx0r more
  • Differing Returns more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD