views:

39

answers:

1

I have a common library and two executables. Each executable refers to the common library for some functionality. I would like the common library to read from the app.config of the exe which is currently running.

Is there specific API calls to do this?

+1  A: 

You may take a look at the ConfigurationManager class:

var someValue = ConfigurationManager.AppSettings["someKey"];

would read the appSettings section of the app.config/web.config of the currently executing process.

Darin Dimitrov
Hmmm... could've sworn I tried that already and it didn't work. I was wrong. Thanks!
Rob Segal