title: Should I call SqlDataReader.HasRows if I am calling SqlReader.Read
body: <p>Trying to see if it is beneficial to add an <code>if (dr.HasRows)</code> before the <code>while (dr.read())</code> function. I mean, technically if it doesn't have rows it isn't going to read, so would it matter if you checked this first?</p>
  
  <pre><code>using (SqlDataReader dr = cmd.ExecuteReader())
  {
      if (dr.HasRows)
      {
          while (dr.Read())
          {
              ....do stuff here
          }
      }
  }
  </code></pre>
  
  <p>or is this going to essentially do the exact same thing if you're just making sure it has values to provide...</p>
  
  <pre><code>using (SqlDataReader dr = cmd.ExecuteReader())
  {
      while (dr.Read())
      {
          ....do stuff here
      }
  }    
  </code></pre>