Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB.Net if bug???
Message
From
23/02/2005 14:46:15
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
VB.Net if bug???
Miscellaneous
Thread ID:
00989793
Message ID:
00989793
Views:
52
Ok,

I ran into this once, and I thought I was nuts, or something so I dismissed it. Now, I have seen it again.

Here is what is happening. I have a DataRow from a Typed Dataset. For each field it gives you the IsFieldNameNull function. So, in VB .Net I would code something like:

if drJournal.IsAutoRevDateNull Then
' Insert a new Journal Entry
else
' Update an existing Journal Entry
end if

So... even though IsAutoRevDateNull is true the above runs the else code. Now, I found three mods that work:

if drJournal.IsAutoRevDateNull Then
' Insert a new Journal Entry
else
' Update an existing Journal Entry
end if

or

if (drJournal.IsAutoRevDateNull) Then
' Insert a new Journal Entry
else
' Update an existing Journal Entry
end if

or

if drJournal.IsAutoRevDateNull() Then
' Insert a new Journal Entry
else
' Update an existing Journal Entry
end if


***********

So, it seems that I need something to force the function to eval. However, it seems to me if VB is not going to require the perens on a function that it should still be evaled to get the boolean value.

Any comments. Is this a bug, or just a VB thing that bothers me cause VFP and C# work fine. Of course, C# requires the perens.

BOb
Next
Reply
Map
View

Click here to load this message in the networking platform