Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Handling DB Nulls
Message
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
01440804
Message ID:
01440895
Vues:
28
>>>I don't see GetNonNull in intellisense.
>>>
>>>What am I doing wrong?
>>
>>string _ProjectName = ds.Tables[0].Rows[0]["ProjectName"].ToString();
>>
>>_ProjectName = _ProjectName.GetNonNull(); // would this work?
>
>Not for non-string values. If the data type of the column is int and it's null, it would error before it got to the GetNonNull line.

Did you try using var or int? ?
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