title: Replacing a DataReader with a DataTable
body: <p>I'm adapting some code that someone else wrote and need to return a DataTable for time's sake.</p>
  
  <p>I have code like this:</p>
  
  <pre><code>using (SqlCommand command = new SqlCommand(query, conn))
  {
        //add parameters and their values
  
        using (SqlDataReader dr = command.ExecuteReader())
        {
            return dr;
        }
  </code></pre>
  
  <p>But what's the best way to return a datatable?</p>