M
mickieparis
Hello, I have a custom exception class that contains a mail handler
class and when an error happens I get an email. In my mail handler
class I pull values from the app.config.
Example:
private void LoadConfiguationSettings() {
this.MailTo = ConfigurationManager.AppSettings["EmailTo"];
this.MailFrom = ConfigurationManager.AppSettings["EmailFrom"];
this.SMTPServer = ConfigurationManager.AppSettings
["SMTPServer"];
}
My question is, does .net need to do a disk I/O to pull these values
every time I instantiate these classes or are the values in app.config
cached? I’d like to avoid as much disk I/O as much as possible.
Thanks
MP
class and when an error happens I get an email. In my mail handler
class I pull values from the app.config.
Example:
private void LoadConfiguationSettings() {
this.MailTo = ConfigurationManager.AppSettings["EmailTo"];
this.MailFrom = ConfigurationManager.AppSettings["EmailFrom"];
this.SMTPServer = ConfigurationManager.AppSettings
["SMTPServer"];
}
My question is, does .net need to do a disk I/O to pull these values
every time I instantiate these classes or are the values in app.config
cached? I’d like to avoid as much disk I/O as much as possible.
Thanks
MP