Advertisement

04.23.2008 at 11:58AM PDT, ID: 23347872
[x]
Attachment Details

IIF function issue in VB.NET

Asked by intikhabk in Visual Studio .NET 2005

Tags: VB.NET

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
[+][-]04.23.2008 at 12:07PM PDT, ID: 21424154

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:10PM PDT, ID: 21424191

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:13PM PDT, ID: 21424241

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:26PM PDT, ID: 21424377

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:27PM PDT, ID: 21424391

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:37PM PDT, ID: 21424505

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:46PM PDT, ID: 21424582

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 01:03PM PDT, ID: 21424751

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Studio .NET 2005
Tags: VB.NET
Sign Up Now!
Solution Provided By: DGarci
Participating Experts: 1
Solution Grade: B
 
 
[+][-]04.23.2008 at 01:12PM PDT, ID: 21424846

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628