8
İmha edilmeden önce bir SQLConnection'ı Kapatmam () gerekir mi?
Tek kullanımlık nesneler hakkındaki diğer soruma göre , bir kullanım bloğunun sonundan önce Close () 'u çağırmalı mıyız? using (SqlConnection connection = new SqlConnection()) using (SqlCommand command = new SqlCommand()) { command.CommandText = "INSERT INTO YourMom (Amount) VALUES (1)"; command.CommandType = System.Data.CommandType.Text; connection.Open(); command.ExecuteNonQuery(); // Is this call necessary? connection.Close(); …