Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting null value on Integer
Message
From
24/01/2016 17:23:05
 
 
To
24/01/2016 16:34:19
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01630133
Message ID:
01630174
Views:
52
>>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?

the ? appears to c# only.

This this alternate form

https://msdn.microsoft.com/en-us/library/b3h38hb0%28v=vs.110%29.aspx
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform