using (
SqlCommand cmd = new SqlCommand("sel ect * sample"),
new SqlConnection( sqlDsn )
)
)
{
SqlDataAdapter adapter = new SqlDataAdapter( cmd);
DataTable dt = new DataTable();
adapter.Fill(dt );
}
Does the SqlConnection automatically get closed when I exit the using?
Comment