Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting null value on Integer
Message
De
23/01/2016 16:31:53
 
 
À
23/01/2016 14:25:51
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01630133
Message ID:
01630135
Vues:
59
int? number;

if (!number.HasValue)
   Console.Writeline("it's null, Jim");
>I have this to detect a null value on a string:
>
>
>        ' If we have a value
>        If Not tcValue Is DBNull.Value Then
>            lcString = Trim(tcValue)
>        End If
>
>
>Using such an approach for an integer won't work because Is operator cannot be used against an integer.
>
>What would be an easier solution?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform