title: How to find the empty cells in the datatable and replace with 0
body: <p>I am working with a very large datatable which has 5000 rows and 8000 columns. In the data table there are some empty cells. I use the following code to fill the empty cells with 0. But since the datatable is very large, the speed is really slow!!! I just want to ask if there are some other ways instead of the for loop. </p>
  
  <pre><code>for (int i = 0; i &lt; SP_dt.Rows.Count; i++)
  {
      for (int j = 0; j &lt; SP_dt.Columns.Count; j++)
      {
          if (SP_dt.Rows[i][j].ToString() == "")
              SP_dt.Rows[i][j] = 0;
          Console.WriteLine("{0}  {1}",i,j);
      }
  
  }
  </code></pre>