I’m using some Microsoft sample code and they have an example of using ConfigurationManager.ConnectionStrings to pull a series of connection strings from the app.config and allow an individual to choose the string they want. I don’t need the ability to choose, I just want to get the specific named connection string I have defined. Something like (yes, I know this isn’t real code):
Configuration.ConnectionStrings.Select("myconnection")
Is this possible? If not, how should I pull in a single connection string?
You need to reference System.Configuration.ConfigurationManager