Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Logic problem
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Logic problem
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01330100
Message ID:
01330100
Vues:
70
Hi everybody,

I could not understand why

if ((e.NewValues["FatherID"]?? "0") =="0" && e.NewValues["Father"] != string.Empty)

evaluates to false

when

e.NewValues["FatherID"]?? "0") shows "0" in the watch window and
e.NewValues["Father"] = "Some value"

But checking

((e.NewValues["FatherID"]?? "0") =="0") also produces false.

Do you see where is my logic mistake here?

I want to do some special coding if ID is 0 or null and Name is not empty.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform