Reading from a different app.config file

  • Thread starter Thread starter James Bender
  • Start date Start date
J

James Bender

Hi,

I can't seem to find anything about this in the help.
Maybe you can do it. Maybe I have Friday-itis. Anyway, I
am developing several apps, all with their own app.config
files. However, there is going to be quite a few common
settings (things like db connections strings, various
production vs. test settings, etc.) that I would like to
put into a common app.config. Is there any way to get an
app settings reader that will read a different file than
the one specifically for my app?

Thanks,
James
 
-----Original Message-----
you would have to make a public readonly property to expose the config
values.

Can you elaborate on that a little for me?

BTW, I forgot to mention that this is a Windows, not a
Web, application. Sorry.

Thanks,
James
 
Hi,

I did not understood exactly what is needed, but:
a) if you need to share some common staff in standart
configuration, then just add link to the file, which
stores all the parameters.
Project\Add existing\(see the arrow near open)choose link
instead of open.
b) if some different config provider is required, I'd
suggest to look at MS Application Blocks (there is one
specially for configuration) available at MSDN.
---
You might want to look at these in MSDN lib:
ms-
help://MS.MSDNQTR.2003APR.1033/dndotnet/html/persistappsett
net.htm


Romualdas
 
Back
Top