Path to exe.config file

  • Thread starter Thread starter Magnus.Moraberg
  • Start date Start date
M

Magnus.Moraberg

Hi,

I have some Settings in my exe.config file, for example the path to my
database. If the path to the database is changed, I wish to inform
them that they can update this path via the exe.config file. How do I
get the path of this file?

Thanks,

Barry
 
Hi,

I have some Settings in my exe.config file, for example the path to my
database. If the path to the database is changed, I wish to inform
them that they can update this path via the exe.config file. How do I
get the path of this file?

Thanks,

Barry

Hi,

The config file is in the same path that the exe. you can get it by
using Assembly.GetExecutingAssembly().Location
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top