IniLibrary

IniLibrary provides full support for Ini files. It makes easier to read, modify and save Ini files. It was written using System.Xml as a model.

Simple and developer-friendly usage

// Create a new instance of IniDocument
IniDocument doc = new IniDocument();

// Load the content from file (or from a TextReader, or from a Stream)
doc.Load(@"Sample.ini");

// Create a new section
IniSection section = new IniSection("MySection");

// Add a new parameter to my section
section.Parameters.Add(
    new IniParameter("MyParameter", "MyValue") {
        Description = "Some text"
    }
);

// Add a section to the document
doc.Sections.Add(section);

// Access sections and parameters by their names
doc.Sections["MySection"].Parameters["MyParameter"].Value = value;

// Save the content to a TextWriter (or to a Stream, or to a file)
doc.Save(Console.Out);

Quick start guide

Ini Language Service for Visual Studio

You can download the Visual Studio 2010 extension here: http://visualstudiogallery.msdn.microsoft.com/0d9e83c9-4ab9-4091-8eed-11db852d5992

Last edited Apr 8, 2011 at 9:22 AM by BlueCode, version 11