Configuration File

  • Thread starter Thread starter Tim Marsden
  • Start date Start date
T

Tim Marsden

Hi

How do I manually read then values held in an app.config file.

I have an application with an application configuration file.
I can read the values in the file using Configuration.appsettings etc and
all is OK.

However I want to read the values from a DLL ( launched form another
application).
how do I do this?

Tim
 
If you overload the constructor for the form in the DLL, you can pass it the
application object when you launch it, this way it will be able to reference
the app.config file of the calling code.

HTH - OHM ( Terry Burns )
 
Tim,
In the DLL you can use the same function:

Configuration.AppSettings

The trick is that only EXE's can have app.config files, you would need to
add an app.config to the other application (exe), with the relevent
settings.

Hope this helps
Jay
 
Do you have an example?
--
..NetHelpWanted


Jay B. Harlow said:
Tim,
In the DLL you can use the same function:

Configuration.AppSettings

The trick is that only EXE's can have app.config files, you would need to
add an app.config to the other application (exe), with the relevent
settings.

Hope this helps
Jay
 
Back
Top