讀取INI文件..可以用外部方法.使用API
[vbnet]
[DllImport(“kernel32”)]
private static extern int GetPrivateProfileInt(
string lpApplicationName,
string lpKeyName,
int nDefault,
string lpFileName);
[DllImport(“kernel32”)]
private static extern bool GetPrivateProfileString(
string lpApplicationName,
string lpKeyName,
string lpDefault,
StringBuilder lpReturnedString ,
int nSize,
string lpFileName);
[DllImport(“kernel32”)]
private static extern bool WritePrivateProfileString(
string lpApplicationName,
string lpKeyName,
string lpString,
string lpFileName);
[DllImport(“kernel32”)]
private static extern bool GetPrivateProfileSection(
string lpAppName,
StringBuilder lpReturnedString,
int nSize,
string lpFileName );
[DllImport(“kernel32”)]
private static extern bool WritePrivateProfileSection(
string lpAppName,
string lpString,
string lpFileName);
[/vbnet]