Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible unintended reference comparison
Message
 
 
À
05/03/2010 09:15:40
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01452752
Message ID:
01452790
Vues:
32
>>>>Shouldn't it be (string) rather than (String) in the first attempt or was that just a typo in the post ?
>>>
>>>How would I do this if boolean values were involved?
>>>
>>>
dt.Rows[0]["Employed"] = false
>>
>>Try casting to Boolean.
>
>That's what I was trying to do, unsuccessfully.

if ((bool) dt.Rows[0]["Employed"] == false)
???
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform