Nini Library API Reference -

IniWriter Class

INI writer class.

For a list of all members of this type, see IniWriter Members.


public class IniWriter : IDisposable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


IniWriter writer = new IniWriter ("test.ini");

writer.WriteEmpty ("This is a comment");
writer.WriteSection ("My Section");
writer.Indentation = 2;
writer.WriteKey ("key 1", "value 1", "Comment 1");
writer.WriteKey ("key 2", "value 2");
writer.Close ();
The output of test.ini would be this:
; This is a comment
[My Section]
  key 1 = value 1 ; Comment 1
  key 2 = value 2


Namespace: Nini.Ini

Assembly: Nini (in Nini.dll)

See Also

IniWriter Members | Nini.Ini Namespace