Syntax
Visual Basic
4
Posts
4
Posters
0
Views
1
Watching
-
-
There is no ternary operator in VB.NET. The closets equivilent is the IIf[^] function.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
VB 2008 does have a true ternary operator with an alternative use of the existing keyword 'If': result = If(somecondition, iftrue, iffalse) this is equivalent to the C# code: result = somecondition ? iftrue : iffalse;
David Anton http://www.tangiblesoftwaresolutions.com C++ to C# Converter C++ to VB Converter C++ to Java Converter VB to Java Converter Java to VB & C# Converter Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: convert VB, C#, or Java to C++/CLI