Click here to Skip to main content
15,918,742 members

Comments by AlanSB2007 (Top 1 by date)

AlanSB2007 10-Jan-12 9:15am View    
Deleted
cmd.Parameters.AddWithValue("@Category", line.Category ?? (defaultvalue ?? DBNull))

Same result, self documenting, don't have to deal with an extra namespace and may create inline code which is faster.

Assuming, of course, that you aren't dealing with dealing with value types. Which draws the proposed extension into question anyway.