nini

using Nini.Ini;
using Nini.Config;
IniDocument doc = new IniDocument("Settings.ini", IniFileType.WindowsStyle);
IniConfigSource source = new IniConfigSource(doc);
source.Configs["[System]"].Set("InstallDirectory", acmInstallDirTextbox.Text);
source.Save();

=>

Try following code:

IniConfigSource source = new IniConfigSource("Settings.ini");
source.Configs["System"].Set("InstallDirectory", @"C:\Program Files(x86)\Test");
source.Save();

or

IniDocument doc = new IniDocument("Settings.ini", IniFileType.WindowsStyle);
doc.Sections["System"].Set("InstallDirectory", @"C:\Program Files(x86)\Test2");
doc.Save("Settings.ini");
 

nini

上一篇:矩阵二分乘


下一篇:在html页面中直接嵌入图片数据