tags:

views:

78

answers:

1

I used the app.config Settings to set up my Config.

class Program
{
  static Settings settings = Settings.Default;

  static void Main(string[] args)
  {   
      Program a = new Program();
      a.init();
  }

  public void init() 
  {
      settings.CurrentArticleNr = settings.ArticleList[0];
      settings.ArticleList.Remove(settings.CurrentArticleNr);
      settings.Save();
  }    
}

My problem is that I thought that if I do settings.Save(); the app.config file would change in the filesystem. But it didn't AND the settings in the file are not read any more. So the ArticleList I did set in the beginning was set run by run in the CurrentArticleNr and runs empty but the config file hasn't changed. Where does it get the config now? and why hasn't he saved the information to the app.config and does not read the appconfig anymore.

All my settings have role=user.

A: 

I think it will be saved in a new user.config file in the user's local app data folder:

C:\Documents and Settings\username\Local Settings\Application Data\appname

(The folder will be different for different versions of Windows).

Mark B