title: Assign null to integer in C#
body: <p>I have a winforms application and i am trying to pass 5 parameters inside the tableadapter in order to execute a query but i get the error "Cannot convert from 'int?' to 'int'. All of them can be nulls.</p>
  
  <pre class="lang-cs prettyprint-override"><code>private int? c_id ;
  private string c_cn;
  private int? c_afm;
  private string c_job;
  private string c_city;
  
  private void btnView_Click(object sender, EventArgs e) {
  c_id = (txtBox_id.Text != string.Empty) ? c_id = Convert.ToInt32(txtBox_id.Text) : c_id = null;
  c_afm = (txtBox_afm.Text != string.Empty) ? c_afm = Convert.ToInt32(txtBox_afm.Text) : c_afm = null;
  c_cn = (txtBox_cn.Text != string.Empty) ? c_cn = txtBox_cn.Text : c_cn = null;
  c_job = (txtBox_job.Text != string.Empty) ? c_job = txtBox_job.Text : c_job = null;
  c_city = (txtBox_job.Text != string.Empty) ? c_city = txtBox_city.Text : c_city = null;
  
  this.clientBrowserTableAdapter.Fill(erpDataSet.PelatesBrowser,c_id,c_cn,c_afm, c_job,c_city);
  }
  </code></pre>
  
  <p>The problem is at c_id and c_afm parameters. Any ideas?</p>