AppUpdater.LocalStructure.DefaultLocalStructureManager.SetConfigValue C# (CSharp) Method

SetConfigValue() private method

private SetConfigValue ( string name, string value ) : void
name string
value string
return void
        private void SetConfigValue(string name, string value)
        {
            string configFilename = Path.Combine(baseDir, "config.xml");
            XmlDocument doc = new XmlDocument();
            doc.Load(configFilename);
            XmlNode lastVersionNode = doc.SelectSingleNode("config/" + name);
            if (lastVersionNode == null)
            {
                lastVersionNode = doc.CreateElement(name);
                doc.SelectSingleNode("config").AppendChild(lastVersionNode);
            }

            lastVersionNode.InnerText = value;
            doc.Save(configFilename);
        }