Click here to Skip to main content
15,891,033 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



 
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 
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 
there may be situations when you want to fake a null value (aka:more than 1 kind of a null value)

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.