Ternary operator in VB.NET

added by jalpesh
4/3/2012 3:13:57 PM


We all know about Ternary operator in C#.NET. I am a big fan of ternary operator and I like to use it instead of using IF..Else. Those who don’t know about ternary operator please go through below link. http://msdn.microsoft.com/en-us/library/ty67wk28(v=vs.80).aspx Here you can see ternary operator returns one of the two values based on the condition. See following example.bool value = false; string output=string.Empty; //using If condition if (value==true) output ="True"; else output="Fa...