Is there a specific exception to be thrown if the connection is closed? I'm writing a method that accepts a SqlConenction object and I wanted to check the connection with State property:
public void MyMethod(SqlConnection sql)
{
if (sql.State != ConnectionState.Open)
{
//Throw the exception
}
}