title: ADO.NET How to read one integer value (coming along with other lists) from Stored Procedure?
body: <pre><code>using (SqlCommand cmd = new SqlCommand("[SPName]"))
  {
      cmd.Parameters.Add("@Param1", SqlDbType.Int).Value = "20";
      cmd.Parameters.Add("@Param2", SqlDbType.Int).Value = "3849";
      cmd.CommandType = CommandType.StoredProcedure;
      using (SqlDataReader dr = db.SelectQry(cmd))
      {
          while (dr.Read())
          {
              //This is select multiple rows in db so i add it to list
          }
  
          dr.NextResult();
  
          while (dr.Read())
          {
                                       //This is select multiple rows in db so i add it to list
          }
  
          dr.NextResult();
  
          //How do i read here if this statement only returns one integer value
      }
  }
  </code></pre>
  
  <p>I might be able to do it with while (dr.Read()) but I don't think its right thing to do. Placing a while to read a single value.</p>
  
  <p>How do I read single integer value in such situation?</p>