Ini Library
AboutThe Ini Library is a dll file that easily lets you read and write to ini files. Its an open source library and is for use for any non-commercial/commercial project. I know its normally easy to read from an ini anyways but I wanted to make it a bit simpler.
How To UseThis is to be used with C# so I'm not sure if it'll work with any other language.
First add a reference to your project. Browse to the IniLib and add it.
Now in the top of your code be sure you include
Okay so lets say we have an ini file that looks like this.
We want to read from that data so this is the code we would use.
Ini ini = new Ini(@"C:\name.ini");
MessageBox.Show(ini.Read(section, key));
So we would replace section with Name and if we wanted it to print our first name we would replace key with First.
MessageBox.Show(ini.Read("Name", "First"));
Writing to an ini file is just as easy. First call our ini.
Ini ini = new Ini(@"C:\name.ini");
Call it by using ini.Write
ini.Write(section, key, value);
So we're gonna replace our first and last name to George Lopez.
ini.Write("Name", "First", "George");
ini.Write("Name", "Last", "Lopez");
Its a very simple to use library and its helped and my laziness.
DownloadsOriginal Library Download (This is if you just want the IniLib)
Download (1.8 KB)Library Source Download (This is the source to the library)
Download (30 KB)Code Example Project (This is a windows form project that has example code in it)
Download (65 KB)
NotesIt is recommended you know some C# before using.
This was made because I am lazy and I wanted a simple way of reading and writing to ini files.
Creditsgame_guy ~ This guy made it though credit isn't needed. I really made it because I was lazy/bored one day and I ended up using it for my own projects. So have fun! (This could have been made by anyone with a little bit of searching)