The .INI file format is a simple way to store settings in a easy to edit format. I have created a simple set of classes used to parse and save .INI files. It uses Dictionaries for easy key based access of parameters and sections. The standard rules for .INI are used for parsing, however the ini format is essentially one long text file and variations do occur.
Included is the source and binaries to the INIFile and a testing program I developed. There is also an example testing INI file that uses every feature that the class offers. Example:
ini.Sections["test1"].Parameters.Add("Test4", "dolphins"); //orini["test1", "Test2"] = "Success!";
INI File Class in C#
Parsing Markup to represent it as Objects
included example doesn't show how to pull individual values from the ini. something such asVariable = ini.Section["AppSettings"].Parameter["Value"];or other similar options...
You can use the getter and setter in value = ini["section", "parameter"] and it acts almost like a 2D array.
Hi, Can you post some examples on how to use this?