title: What is using connection in the code
body: <p>What is the purpose of <code>using (connection)</code> in the code - please explain me</p>
  
  <pre><code>static void HasRows(SqlConnection connection)
  {
      using (connection)/// what is this line 
      {
          SqlCommand command = new SqlCommand(
            "SELECT CategoryID, CategoryName FROM Categories;",
            connection);
          connection.Open();
  
          SqlDataReader reader = command.ExecuteReader();
  
          if (reader.HasRows)
          {
              while (reader.Read())
              {
                  Console.WriteLine("{0}\t{1}", reader.GetInt32(0),
                      reader.GetString(1));
              }
          }
          else
          {
              Console.WriteLine("No rows found.");
          }
          reader.Close();
      }
  }
  </code></pre>