title: Test sql connection without throwing exception
body: <p>To test if i can connect to my database, I execute the following code :</p>
  
  <pre><code>using (SqlConnection connection = new SqlConnection(myConnectionString))
  {
     try
     {
        connection.Open();
        canConnect = true;
     }
     catch (SqlException) { }
  }
  </code></pre>
  
  <p>This works except it throws an exception if the connection failed. Is there any other way to test a Sql connection that doesn't throw an exception ?</p>
  
  <p>Edit :
  To add precision, i'm asking if there is a simple method that does that without having to open the connection and catch exceptions that can occur</p>