title: Assign null to a SqlParameter
body: <p>The following code gives an error - "No implicit conversion from DBnull to int."</p>
  
  <pre><code>SqlParameter[] parameters = new SqlParameter[1];    
  SqlParameter planIndexParameter = new SqlParameter("@AgeIndex", SqlDbType.Int);
  planIndexParameter.Value = (AgeItem.AgeIndex== null) ? DBNull.Value : AgeItem.AgeIndex;
  parameters[0] = planIndexParameter;
  </code></pre>