没试过,不过建议你可以查找framework的帮助文档,应该有相关的资料!

解决方案 »

  1.   

    C#调用ini需要两个API函数:[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);
      

  2.   

    补充:调用API需要using System.Runtime.InteropServices;