This is what you need:
using(SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["connect"].ConnectionString))
{
}
Note: this is better than the other answers because it includes another hint: use the using keyword to ensure that your connection object is deleted and therefore prevent problems with the connection pool. :)
, , , (ConfigurationManager.ConnectionStrings [ "connect" ]. ConnectionString) SqlConnection.
, #, ( ).
!