Ini.net is Dotnet Framwork library for reading and writing to INI file
- Open your project in Visual Studio.
- Right click on References and select Manage NuGet packages.
- Search for Tantowi.Ini, and install
- Read ini file
IniFile ini = IniFile.of("d:\\config.ini");
string name = ini.Read("setting", "company.name");
- Write ini file
IniFile ini = IniFile.of("d:\\config.ini");
ini.Write("setting", "company.name", "Github Corporation");
- Get list of section
IniFile ini = IniFile.of("d:\\config.ini");
string[] sections = ini.GetSections();
- Get list of key in a section
IniFile ini = IniFile.of("d:\\config.ini");
string[] keys = ini.GetKeys("setting");