title: Check if Datatable Value is Null
body: <p>Basically, I just want to ask how to check a datatable value if it is null or not? I am looping through each cells on the table, and check if the value of a cell is null.</p>
  
  <p>I tried this </p>
  
  <pre><code>If Not dt.Rows(i)(j).value Is Nothing Then
     MsgBox("cell empty")
  End If
  </code></pre>
  
  <p>and</p>
  
  <pre><code>If Not dt.Rows(i)(j).value = "" Then
     MsgBox("cell empty")
  End If
  </code></pre>
  
  <p>but it is not working.</p>
  
  <p>As of now, my datatable looks like this</p>
  
  <p>"e" means empty</p>
  
  <p>"ne" means not empty</p>
  
  <p>"x" dont care</p>
  
  <hr>
  
  <pre><code>Col1 Col2 Col3 ... 
  
  ne   x    x   ...
  
  x    e    x   ...
  
  x    x    x   ...
  </code></pre>
  
  <p>examples from the table above..</p>
  
  <p>dt(0)(0) = ne</p>
  
  <p>dt(1)(1) = e</p>
  
  <p>dt(0)(1) = either "e" or "ne"</p>
  
  <p>PS, <strong>all the data in the datatable are all strings..</strong></p>
  
  <p>how can I get the value if dt(1)(1) is empty? C# codes would be okay too..thanks</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>somehow, I've managed to solve my question by doing this, it met my requirement in my program so.. yea.</p>
  
  <pre><code>If dt.Rows(i)(j).Value.ToString = "" Then
     MsgBox("empty")
  End If
  </code></pre>
  
  <p>thanks. Please close the thread.</p>