Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting null value on Integer
Message
De
24/01/2016 16:34:19
 
 
À
24/01/2016 15:52:35
Bill Fitzgerald (En ligne)
Woodbury Systems Group
Hamilton, New Jersey, États-Unis
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:
01630166
Vues:
47
>number is not an integer; it's a nullable integer because of the ?
> int? value = null;
> Console.WriteLine(value.HasValue);
> value = 1;
> Console.WriteLine(value.HasValue);
> Console.WriteLine(value)
>
>When I run this I get
>false
>true
>1

It appears this syntax is C# only. Could it be?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform