I have created a settings class where I added some parameters that are shown in the app.config
below.
I want to access the connectionStrings
and the usersettings
inside my class but my attempts are not successful.
I've tried for example :
ConfigurationManager.ConnectionStrings['Alerter.AlerterSettings.ConnectionString']
But it doesnt work.
Here is the app.config
:
<connectionStrings>
<add name="Alerter.AlerterSettings.ConnectionString" connectionString="DefaultEndpointsProtocol=https;sometext" />
</connectionStrings>
<userSettings>
<Alerter.AlerterSettings>
<setting name="TableName" serializeAs="String">
<value>table5</value>
</setting>
<setting name="EmailUser" serializeAs="String">
<value>user</value>
</setting>
<setting name="EmailPass" serializeAs="String">
<value>pass</value>
</setting>
</Alerter.AlerterSettings>
</userSettings>