title: Disposing the Sql Connection
body: <p>Just wondering, Would the SqlConnection be diposed/closed when this method is done?  Or do i have to explicitly call the close method at the end?</p>
  
  <pre><code>   using (SqlCommand cmd = new SqlCommand(sql, GetConnection()))
     {
         SqlDataReader reader = cmd.ExecuteReader();
         while (reader.Read())
         {
         }
     }
  
  SqlConnection GetConnetion()
  {
   return new SqlConnection("connectionstring");
  }
  </code></pre>
  
  <p>I know i can do something like this:</p>
  
  <pre><code>SqlConnection conn = GetConnetion();
  SqlCommand cmd =new SqlCommand(sql, conn);
  //Do Something
  conn.Close()
  cmd.Dispose()
  </code></pre>
  
  <p>But just curious how the using block will work in this case.
  Cheers</p>