IIf Function in VB.NET
IIF returns one of two objects, depending on the evaluation of an expression.
IIF is a function and it only specific to VB.NET, because in C# there is no IIF, so it is not the part Common Language Runtime. IIf is an alternative to the If...Then...Else statement in VB.NET
Consider the following example :
is same as:
Both statements returns True.
Note :The expressions in the argument list can include function calls.