C # read and write profile Using system; use system.Runtime.InteropServices; use system.text;
Namespace Mp3Manager.commm {///
[DLLIMPORT ("kernel32")] Private static extern int GETPRIVATEPROFILESTRING (String Section, String Key, String DEF, STRINGBUILDER RETVAL, INT SIZE, STRING FILEPATH);
/ / Write the function of the INI file PUBLIC VOID INIWRITEVALUE (String section, String Key, String, String FilePath) {WritePrivateProfileString (Section, Key, Value, FilePath);} / / Function for read operations for INI files PUBLIC string IniReadValue (string Section, string Key, string filepath) {StringBuilder sbTemp = new StringBuilder (255); int i = GetPrivateProfileString (Section, Key, "", sbTemp, 255, filepath); return sbTemp.ToString ();} public Rwini () {// // Todo: Add constructor logic //}}}}} here