Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does this framework code work?
Message
De
31/08/2004 11:06:53
Max Fillmore
Essential Skills, Inc.
Lenexa, Kansas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00937868
Message ID:
00938034
Vues:
21
Thanks Kevin, but I think you missed the point of my question. I don't really care about the watch window. What I care about is that it appears that code is executing that should not be executing!

In the if clause you have three boolean expressions connected by logical or operators thus:

if (this.ParentBizObjTable == "" ||
mmString.Empty(e.TableName) ||
(this.ParentBizObjTable.ToLower() == e.TableName.ToLower()))
{
...
}

The first expression "this.ParentBizObjTable" evaluates to "BTS" in my watch window. The second expression "mmString.Empty(e.TableName)" evaluates to False as "e.TableName" evaluates to "Carrier". The third expression provides the error in the watch window but if it could be evaluated it must surely be False also because this.ParentBizObjTable <> e.TableName in as much as "BTS" <> "Carrier". That much is clear. According to my boolean logic False OR False OR False = False so the entire if expression should evaluate to False. And yet the code in the dependent block executes when it clearly should not!

Is it possible that since both of the .ToLower() expressions evaluate to the same error code that they are comparing as equal? If this code is valid why does it execute incorrectly in the VS.NET debugger?

Inquiring minds want to know.

Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform