Tag: Settings

Access INI File with C#

Hi have a good day This simple class will allow to Write and Read INI Files ( Old Windows Settings Files ) using System; using System.Runtime.InteropServices; using System.Text; class INIFile { [DllImport(“kernel32.dll”)] private static extern int WritePrivateProfileString(string ApplicationName, string KeyName, string StrValue, string FileName); [DllImport(“kernel32.dll”)] private static extern int GetPrivateProfileString(string ApplicationName, string KeyName, string DefaultValue, […]

Save / Restore Application Settings using File

This Simple Class will allow you to Save and restore any class instance using files. It’s very useful if you want to save your Application settings, Specially if your Application is portable, Or if you do want to use Windows registry. The Class Code : using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Reflection; […]