WinForms app.config path

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

Hello all,

In a WinForm application I need to return the file path of the
app.config file.

How would I do this?

Thanks all,

Jon
 
You could use either:

Application.StartupPath

or

Assembly.GetExecutingAssembly().Location
 
In a WinForm application I need to return the file path of the
app.config file.

The app.config will be located in the directory specified by
Application.StartupPath. I know of no exceptions to this rule, although
someone please correct me if there is.

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top