Click here to Skip to main content
15,897,187 members

Survey Results

Do you use null values or magic numbers?   [Edit]

Survey period: 11 Dec 2006 to 17 Dec 2006

Many languages allow you to store null values in place of actual data. If you have no data for a value do you null it or store, say, -1?

OptionVotes% 
I always use null values in code49937.18
It depends on the situation74255.29
I never use null values in code1017.53



 
GeneralRe: In C#, please use MinValue or MaxValue. Pin
jhwurmbach18-Dec-06 2:38
jhwurmbach18-Dec-06 2:38 
GeneralRe: In C#, please use MinValue or MaxValue. Pin
Ri Qen-Sin22-Dec-06 14:09
Ri Qen-Sin22-Dec-06 14:09 
GeneralThe default keyword Pin
WillemM11-Dec-06 5:40
WillemM11-Dec-06 5:40 
GeneralRe: The default keyword Pin
Steve Hansen12-Dec-06 23:03
Steve Hansen12-Dec-06 23:03 
GeneralDBNull Pin
Marc Clifton11-Dec-06 2:18
mvaMarc Clifton11-Dec-06 2:18 
GeneralRe: DBNull Pin
Kevin McFarlane17-Dec-06 8:46
Kevin McFarlane17-Dec-06 8:46 
Generalnull value isn't always undesirable Pin
redclover11-Dec-06 1:38
redclover11-Dec-06 1:38 
GeneralNo-value is different from null-value Pin
Emilio CL10-Dec-06 23:38
Emilio CL10-Dec-06 23:38 
There are many situations where is needed to know if we deal with no value or empty. I mean, sometimes a user has selected empty value for an option, and in this case no default value comes into place. It's not the same case when the same user has made no selection at all, this time, a null value is handy.
GeneralNullable types in C# rock. Pin
stano10-Dec-06 23:09
stano10-Dec-06 23:09 
GeneralIt's convenient Pin
Michael Dunn10-Dec-06 18:47
sitebuilderMichael Dunn10-Dec-06 18:47 
GeneralRe: It's convenient Pin
Jörgen Sigvardsson12-Dec-06 11:44
Jörgen Sigvardsson12-Dec-06 11:44 
Generalit depends Pin
Pharago10-Dec-06 18:03
Pharago10-Dec-06 18:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.