public
Last active

Writes an INI file using Nini

  • Download Gist
Nini_Write_File.cs
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
Shows an example of Nini's IniDocument class to write an INI file. The example below
will write the following INI file "configuration.ini":
 
[Cars]
model = Toyota
year = 2012
*/
 
Nini.Ini.IniDocument doc = new Nini.Ini.IniDocument();
 
doc.SetSection ("Cars");
doc.SetKey("Cars", "model", "Toyota"));
doc.SetKey("Cars", "year", "2012"));
 
doc.Save("configuration.ini");

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.