title: Insert a null value to an int column in sql server
body: <p>I have a subroutine to insert a record to sql server table.
  The code:</p>
  
  <pre><code>    public void Insert_Met(int Counts, char Gender)
      {
          Dictionary&lt;string, object&gt; parameters = new Dictionary&lt;string, object&gt;();
          parameters.Add("@Counts", Counts);
          parameters.Add("@Gender", Gender);
          // run a stored procedure ExecuteNonQuery
      }
  </code></pre>
  
  <p>I other line code,</p>
  
  <pre><code>      int counts = Convert.ToInt32(numberUpdowncontrol1.Text);
         // from a control, maybe empty then it is null.
        Insert_Met(counts,'M');
  </code></pre>
  
  <p>My question is sometimes Counts can be null, so how to change my code?</p>
  
  <p>Thanks,</p>