Create a gist now

Instantly share code, notes, and snippets.

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