Created
October 11, 2016 15:03
-
-
Save csdear/57bd1f3d8121991dfcd4c99184aaa2d9 to your computer and use it in GitHub Desktop.
App Settings Application Settings Configuration Settings No magic numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//e.g., key in the web config | |
<appSettings> | |
<add key="FromAddress" value="[email protected]"/> | |
</appSettings> | |
*** | |
//namespace to call. | |
+using System.Configuration; | |
// e.g., calling the value. | |
protected virtual string FromAddress { get { return ConfigurationManager.AppSettings["FromAddress"]; } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment