Microsoft
Software
Hardware
Network
Question : Check for nulls to stop the error - Nullable object must have a value
In the line of code below I want to check if nothing is being passed to User.longVal to stop the error
"Nullable object must have a value"
User.longVal = (double)CurrentUser.longVa
l;
So if nothing is in the
(double)CurrentUser.longVa
l
I want to set a default value -
Do I use the ?? directive
Answer : Check for nulls to stop the error - Nullable object must have a value
I believe it should be something like (C# only):
1:
User.longVal = (double)CurrentUser.longVal ?? default_value;
Random Solutions
[AutoIT] Creating a Control that Looks Like a Spreadsheet
Active Directory Query - Servers Only - DG
How to stablish a proper setup in MS Outlook 2003 encrypting mails
Some users can't access OWA
Need a driver for sm bus controller on Dell d620
bulk collect - amount of return
Windows PFBACKUP can't find my Outlook PST.
Exchange 2003 (SBS) not sending or receiving.
Access VBA Word merge
Er diagram for university accommodation office