我有以下代码:
using (SqlCommand command = new SqlCommand())
{
command.CommandType = System.Data.CommandType.StoredProcedure;
command.Connection = new SqlConnection();
command.CommandText = "";
command.Parameters.Add(new SqlParameter("@ExperienceLevel", 3).Direction = System.Data.ParameterDirection.Input);
SqlDataReader dataReader = command.ExecuteReader();
}
在我当前声明SqlConnection的位置和这样声明之间,是否存在功能影响?
using (SqlCommand command = new SqlCommand())
using (SqlConnection connection = new SqlConnection())
谢谢