I am using IIF function in VB.NET.Below is my code
Dim input As String = "NA"
'123456789
'MessageBox.Show(IIf(input
= "NA", "True", input.Insert(3, "-").Insert(6, "-")))
MessageBox.Show(IIf(input = "NA", "True", "False"))
My commented messagebox throws an error and my uncommented messsagebox works fine...
I am not able to find out the reason...it should return me True...It is doing so in the uncommented MesssageBox but not in the commented Messagebox..please help
Start Free Trial