title: Cannot assign <null> to an implicitly-typed local variable
body: <p>I want to to select a field from Data table <code>dt_branches_global</code> in such a way that, if <code>radioButton_QP</code> is Checked then the Data table will contain a <code>string</code> field otherwise the Data Table contain an <code>int</code> field. This is what I am doing. But I am getting error while initializing the variable Var. </p>
  
  <pre><code>var AllBranch_IDs = null;
  
  if (radioButton_QP.Checked == true)   
  AllBranch_IDs = dt_branches_global.AsEnumerable().Select(x =&gt; x.Field&lt;string&gt;("BusinessSectorID")).ToArray();
  else
  
  AllBranch_IDs = dt_branches_global.AsEnumerable().Select(x =&gt; x.Field&lt;int&gt;("BusinessSectorID")).ToArray();
  </code></pre>