IniFile is a library that gives access to inifiles including semicolon separated comments.

Example usage:

  String Class = "class";
  String ClassKey = "classkey";
  using (IniFile ini = new IniFile(IniFileName))
    ini.WriteString(ClassKey, String.Format("item_{0}", ini.ReadInteger(ClassKey, "Count", 0)), Class);
    ini.WriteInteger(ClassKey, "Count", ini.ReadInteger(ClassKey, "Count", 0) + 1);

  • The IniFile is created under %appdata% if no fully qualified path is specified. This prevents UAC problems with Windows Vista/7.
  • EncryptIt is available on this site. Note that a 'secret' seed has to be added before the code works.

Know Issues:
  • Reading and writing both floating points and dates wil give problems with regional settings when it changes.

Last edited Jan 7, 2010 at 5:08 PM by wvd_vegt, version 5


No comments yet.