Information générale
Catégorie:
The Mere Mortals .NET Framework
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement