"Garg" <sh**********@gmail.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
I want to use an equivalent of isLeap function in vb.net.
Please tell me what would that be?
ret1 = (isLeap(document.all("lstYear1").value)) ? 29 : 28;
Assuming lstYear is a DropDownList, something like:
If DateTime.IsLeapYear(lstYear1.SelectedItem.Text) Then
ret1 = 29
Else
ret1 = 28
End If
I haven't tried the above, as I never use VB.NET...
I'm not sure if VB.NET has the ? "immediate if" operator - C# certainly
does. If not, maybe VB.NET has kept the old VB IIf(...?) syntax...?