Get Connectionstring from app.config
<connectionStrings>
<add name="myConnectionString" connectionString="server=localhost;database=myDb;uid=myUser;password=myPass;" />
</connectionStrings>
Output
<add name="myConnectionString" connectionString="server=localhost;database=myDb;uid=myUser;password=myPass;" />
</connectionStrings>
Output
string connStr = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
MessageBox.Show(connStr);
MessageBox.Show(connStr);