Accessing ConnectionStrings from App.config in a Console Application Project

Earlier today i added a configuration file to my Console Applicaton Project (Add Item -> Application Configuration File). Via ConfigurationSettings i could only access the AppSettings. It took me a while to figure out that i had to add a reference to System.Configuration.dll. Once that was done i could access the ConnectionStrings via ConfigurationManager.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>