Skip to content

Instantly share code, notes, and snippets.

@bmatzelle
Created February 22, 2012 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmatzelle/1880365 to your computer and use it in GitHub Desktop.
Save bmatzelle/1880365 to your computer and use it in GitHub Desktop.
Writes an INI file using Nini
/*
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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment