// You will have to load the config somehow. Either by the exe filename or the config filepath directly var cfg = ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location); var setting = new ConnectionStringSettings { ConnectionString = "hello=123", Name = "123test" } cfg.ConnectionStrings.ConnectionStrings.Add(setting); cfg.Save();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)