Search code examples
c#winformsapplication-settings

How to get application settings path in winforms?


In Settings.Settings in Winforms I have some User settings, and I must clean up them.

I can't do it by:

Settings.Default.SomeUserSettings = null;

It must be done by hand .

So, where can I find those settings ?

I'm using windows 7.

Or maybe you know some application, from which I can find last edited files?


Solution

  • Look in the folder of your application, there is a XML file named yourAppName.exe.config. This is where the user settings are saved.

    To get the path you can use :

    string path = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;