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
 
Back
Top