可以通过调用kernel32.dll中的两个api:WritePrivateProfileString,GetPrivateProfileString来实现对ini 文件的读些。 具体实现的代码如下: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Runtime.InteropServices; using System.Text; namespace iniprocess