title: how to define a connection string using an app.config file in C#
body: <p>Currently i manually define my connection string in my C# code:</p>
  
  <pre><code>string ConnectionString = "Data Source=C;Initial Catalog=tickets;Integrated Security=True";
  SqlConnection Conn = new SqlConnection(ConnectionString);
  Conn.Open();
  </code></pre>
  
  <p>In my project i have an app.config file and i can see that it has a connection string.
  It looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  &lt;configSections&gt;
  &lt;/configSections&gt;
  &lt;connectionStrings&gt;
      &lt;add name="ticketNotification.Properties.Settings.ticketsConnectionString"
          connectionString="Data Source=C;Initial Catalog=tickets;Integrated Security=True"
          providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  &lt;startup&gt;&lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>How can i define the connection string based on the app.config file in the same folder as my application?</p>