.INI files are somewhat out of date - they stopped being the recommended way of doing things with Windows 95, and that was nearly twenty years ago! :laugh:
However, if you must...
You can use the Windows methods which will still work:
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section, string key,string val,string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key,string def, StringBuilder retVal, int size,string filePath);
Then to write:
WritePrivateProfileString("Section","Key","Value",pathToINIFile);
And read:
StringBuilder result = new StringBuilder(255);
int i = GetPrivateProfileString("Section", "Key", "Default", result, 255, pathToIINIFile);
string value = result.ToString();