title: Efficient way to check if DataTable has row
body: <p>I have a function that search for a keyword and then return DataTable. I want to check if there rows inside because sometimes there's no query found. </p>
  
  <pre><code>    'which one shoud I use ?
      If dtDataTable Is Nothing Then
          'some code
          lbl_count.Text = "Found 0 result"
      End If
  
      If dtDataTable.Rows.Count &gt; 0 Then
          'some code
          lbl_count.Text = "Found " &amp; dtDataTable.Rows.Count.ToString &amp; " results"
      End If
  </code></pre>
  
  <p>Thanks.</p>