爲什麼ReSharper的警告我下面的代碼示例中「獲得處置關閉」:這裏「進入處置關閉」是什麼意思?
using (SqlCommand command = new SqlCommand())
{
command.Parameters.Add("@temp", SqlDbType.VarChar);
Action<string> action = str =>
{
command.Parameters["@temp"].Value = string.Empty;
};
}
我不使用代理外using
聲明...如何解決這一問題?
告訴我,如果我錯了,但不會拋出一個'ObjectDisposedException'而不是一個NRE? – knittl
最有可能是ODE .. –