I do not see the pointer that you are pointing to, at least when I test the script using SqlConnectionStringBuilder .
The ConnectionTimeout property of the connection corresponds to the ConnectTimeout on the builder. I used 5, 20, and 120 as values, and they were all installed in the connection.
using System.Data.SqlClient;
var builder = new SqlConnectionStringBuilder(); builder.ApplicationName = "My Demo App"; builder.ConnectTimeout = 5; builder.DataSource = "(local)"; builder.InitialCatalog = "My Database"; builder.IntegratedSecurity = true; using(var connection = new SqlConnection(builder.ConnectionString)) { Console.WriteLine("Connection Timeout: {0}", connection.ConnectionTimeout); }
If you are not dealing with SQL, you can also use DbConnectionStringBuilder or one of its subtypes. In general, I believe that it is safe to build the connection string programmatically using one of the available collectors, so that you can avoid the poor formatting of the connection string that you will use to create the connections.
Oppositional
source share