Thursday, November 20, 2008
IF is called as conditional operator and we can use it both vb.net as well c#.net.
But IIF is the ternary operator, it will take three parameter like expression,true,false. If the expression result is true then it will return TRUE otherwise return FALSE. There is no IIF concept in the c#.net.
syntax for IF:
if i==0 Then
syntax for IIF:
Dim AboutVB As String = "Great"
IIf(AboutVB = "Great", "Oh Ja!", "Bummer"))
Go through the below link:
Also Read other Top Articles
- JSON Serialization in VS 2008
- Implementing Forms Authentication in Silverlight Application.
- Making GridView Rows or Individual Cells Clickable and Selectable.
- Enabling browser back button for GridView Paging and Sorting in Ajax 1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008)
- How to pass values from User Control to Page or calling Page methods from User Control.
- What is WCF?
- New features in C# 4.0
- C# to VB.NET and VB.NET to C# online free converter tools.