在网上找了关于ini文件读写方法,还是没有找到ini文件中有一个Section多个Key的读写情况,在一篇C++文章中得到点提示操作如下: 1.创建ini文件读写类: using System.Runtime.InteropServices;using System.Text;namespace INIDemo 2.测试INI文件读写: //写入ini文件 private void button1_Click(object sender, EventArgs e) } 结果:[Section1] Key1=Key1's Value [Section2] Key2=Key2's Value [UseFileName] file1=value1 file2=value2 file3=value3 file4=value4 相关文章: