ini文件格式
[Section1]
KeyWord1 = Valuel
KeyWord2 = Value2
……
[Section2]
KeyWord3 = Value3
KeyWord4 = Value4
代码段
[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);
/*参数:section:INI文件中的段落;key:INI文件中的关键字;
val:INI文件中关键字的数值;filePath:INI文件的路径。*/
private void buttonRead